Closed G-Thor closed 2 years ago
After examining this I found that this is caused by this git submodule dependency. Moving this tools/tts_frontend.py script into this repo and replacing the git submodule with a regular python dependency to the official reynir-correct might be advisable, as the git submodule conflicts with regular installations of reynir-correct. If needed you specify the version of the dependency to insure against breaking changes.
The method the error refers to, is in fact additional code for TTS. I notice you are using Python 3.7, this syntax is apparently only valid from 3.9 onwards. I'll fix this to be downward compatible and update the module. As commented before, the "4LT" version is essential for the tts-frontend, as we need more control over the core processes of GreynirCorrect.
Indeed this particular error was solved by using python 3.9 instead, which allows this kind of type hint. Sorry about that.
I've merged the current status of Miðeind's GreynirCorrect into the 4LT-fork and changed the above syntax, and updated the version in tts-frontend.
When importing manager.textprocessing_manager.Manager I receive the following error:
Traceback (most recent call last): File "", line 1, in
File "/scratch/gunnar/unit-selection-festival/venv/lib/python3.7/site-packages/manager/textprocessing_manager.py", line 29, in
from .spellchecker_manager import SpellCheckerManager
File "/scratch/gunnar/unit-selection-festival/venv/lib/python3.7/site-packages/manager/spellchecker_manager.py", line 1, in
from reynir_correct.tools import tts_frontend
File "/scratch/gunnar/unit-selection-festival/venv/lib/python3.7/site-packages/reynir_correct/init.py", line 38, in
from .errtokenizer import (
File "/scratch/gunnar/unit-selection-festival/venv/lib/python3.7/site-packages/reynir_correct/errtokenizer.py", line 2860, in
def extract_all_meanings(lemma: str, db: GreynirBin) -> list[BIN_Tuple]:
TypeError: 'type' object is not subscriptable
This seems to be a dependency-related error coming from the reynir-correct package. Perhaps updating the dependency version will fix this?