sign-language-processing/spoken-to-signed-translation

unable to run dummy_lexicon

Closed this issue · 5 comments

@AmitMY
I want to translate from English to ASL, so I decided to use the dummy_lexicon as a test first. However, I encountered issues after running the following commands:

cd spoken-to-signed-translation && pip install .

For every command, I encounter the following errors:

Command Example 1:

text_to_gloss --text "Kleine Kinder essen Pizza." --glosser simple --spoken-language de --signed-language sgg

Output:

Text to gloss
Input text: Kleine Kinder essen Pizza.
Traceback (most recent call last):
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/bin/text_to_gloss", line 8, in <module>
    sys.exit(text_to_gloss())
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/lib/python3.9/site-packages/spoken_to_signed/bin.py", line 76, in text_to_gloss
    gloss = _text_to_gloss(args.text, args.spoken_language, args.glosser)
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/lib/python3.9/site-packages/spoken_to_signed/bin.py", line 13, in _text_to_gloss
    module = importlib.import_module(f"spoken_to_signed.text_to_gloss.{glosser}")
  File "/opt/homebrew/Cellar/python@3.9/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/lib/python3.9/site-packages/spoken_to_signed/text_to_gloss/simple.py", line 3, in <module>
    from simplemma.simplemma import LANGLIST
ModuleNotFoundError: No module named 'simplemma.simplemma'

Command Example 2:

text_to_gloss_to_pose \
  --text "Kleine Kinder essen Pizza." \
  --glosser "simple" \
  --lexicon "assets/dummy_lexicon" \
  --spoken-language "de" \
  --signed-language "sgg" \
  --pose "quick_test.pose"

Output:

Traceback (most recent call last):
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/bin/text_to_gloss_to_pose", line 8, in <module>
    sys.exit(text_to_gloss_to_pose())
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/lib/python3.9/site-packages/spoken_to_signed/bin.py", line 103, in text_to_gloss_to_pose
    gloss = _text_to_gloss(args.text, args.spoken_language, args.glosser)
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/lib/python3.9/site-packages/spoken_to_signed/bin.py", line 13, in _text_to_gloss
    module = importlib.import_module(f"spoken_to_signed.text_to_gloss.{glosser}")
  File "/opt/homebrew/Cellar/python@3.9/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/wenyaogao/PycharmProjects/spoken-to-signed-translation/venv/lib/python3.9/site-packages/spoken_to_signed/text_to_gloss/simple.py", line 3, in <module>
    from simplemma.simplemma import LANGLIST
ModuleNotFoundError: No module named 'simplemma.simplemma'

any step I missed and is there any solution for this?

The simplemma package is listed as a dependency, unclear why it would not install it
https://github.com/sign-language-processing/spoken-to-signed-translation/blob/main/pyproject.toml#L14

Please just install pip install simplemma.

Thanks! I have already installed simplemma, but it still doesn't work. The issue seems to be with simplemma.simplemma.

I have found the reason, for folks use simplemma is or higher than version 1.0.0, the way to get the list of supported languages is

from simplemma.strategies.dictionaries.dictionary_factory import SUPPORTED_LANGUAGES
adbar/simplemma#136

Thanks! fixed in 905367b
Fyi, we are happy to accept fixes if you submit a PR in the future.

Sure thing! Happy to submit a PR in the future.

Thanks! fixed in 905367b Fyi, we are happy to accept fixes if you submit a PR in the future.