Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Accentor.py while reading a file #30

Open
dborysowski opened this issue Jul 29, 2019 · 0 comments
Open

Using Accentor.py while reading a file #30

dborysowski opened this issue Jul 29, 2019 · 0 comments

Comments

@dborysowski
Copy link

I'm trying to use only Accentor.py (to get only accents, but not transcriptions). I've created a simple code that is reading a file line by line (single word in each line), putting on stress for each word read, adding words to a list and then writing them to an output file. After a 1000 of words I'm getting this error message:

Traceback (most recent call last):
File "/home/user_name/__nsu-ai/russian_g2p/Accentor.py", line 293, in do_accents
res = self.__do_accents(prepared_phrase, morphotags_of_phrase)
File "/home/user_name/__nsu-ai/russian_g2p/Accentor.py", line 524, in __do_accents
cur_accented_wordforms = sorted(self.get_correct_omograph_wiki(root_text, cur_word, morphotags_list[0]))
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "accentize_russian_g2p.py", line 10, in
accented_word = accent.do_accents([[word.strip()]])
File "/home/user_name/__nsu-ai/russian_g2p/Accentor.py", line 308, in do_accents
raise ValueError(err_msg)
ValueError: 'NoneType' object is not subscriptable

I thought it's connected to a specific word, so I deleted it and tried again, but it always stops after 1000 stresses done at 1001st stress to put. Is there any limit set up for Accentor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant