Home>
Troubleshooting
I download a piece of work data from the Aozora Bunko and use Janome to make a program that gets parts of speech, but I get an error when I install janome. What should I do?
Applicable source codeimport urllib.request
from janome.analyzer import Analyzer
from janome.charfilter import *
from janome.tokenizer import Tokenizer
class MainTextCharFilter (CharFilter):
def __init __ (self, start, end):
self.start = start
self.end = end
def apply (self, text):
return text.split (self.start) [1] .split (self.end) [0]
# Natsume Soseki
# I'm a cat
html = ''
with urllib.request.urlopen (url) as response:
html = response.read (). decode ('shift_jis')
char_filters = [UnicodeNormalizeCharFilter (),
MainTextCharFilter ('<div>', '<div>'),
RegexReplaceCharFilter ('<rp>\ (. *? \)</rp>', ''),
RegexReplaceCharFilter ('<. *?>', '')]
tokenizer = Tokenizer ()
analyzer = Analyzer (char_filters, tokenizer)
for token in analyzer.analyze (html):
print (token)
Error message
Traceback (most recent call last):
File "directory name", line 3, in<module>
from janome.analyzer import Analyzer
ModuleNotFoundError: No module named 'janome'
janome installation screen (Anaconda prompt)
Add a response
Result of entering pip show janome
Result of entering import sys;print (sys.prefix)
-
Answer # 1
Related articles
- error when running python setuppy install
- python - i get an error when i type pip3 install scikit-learn
- about python pip install error
- i tried to install python 390 on my mac with pyenv, but i get an error and can't install it
- python - i got an import error even though i did pip install
- python - in raspberry pi, the error occurs only in the case of the automatic start program using systemd
- indent error doesn't go away, python
- python - an error occurs in the if statement program that compares the size of numbers
- python - sklearn, svm error
- python - error in image binarization using cv2adaptivethreshold function
- python - categorical_crossentoropy error does not resolve
- eliminating pandas install and import in python pyenv export ldflags
- error in import xlrd of python file from cakephp
- readcsv error in python
- python - i want to display an image with pysimplegui, but an error occurs
- python - error when scraping with selenium and firefox
- [python] graphviz output format error
- python - i get an error when connecting to a voice channel with discordpy
- python 3x - best estimator: i get an error with no syntax, so please tell me what to do
- [python] i don't know how to solve the error
Trends
- python - you may need to restart the kernel to use updated packages error
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to check the type of a shell script variable
- i want to call a child component method from a parent in vuejs
At the Anaconda prompt
Confirm the installation destination as.
On python code
Executeto check the installation destination of the interpreter that is running.
If you don't have janome installed in the latter directory, something may be wrong.
If it is difficult to judge, please tell us the results.