Skip to content
Snippets Groups Projects
Commit 74a7cf22 authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Merge branch 'master' of gitlab.cl.uni-heidelberg.de:Messerschleifer/Allzweckmesser

parents c82ebbbd 881276cf
No related branches found
No related tags found
No related merge requests found
......@@ -226,8 +226,12 @@ def get_syllables_for_token(token: Token):
def get_syllables(reading):
i = 0
for token in reading.tokens:
token.syllables = get_syllables_for_token(token)
for s in token.syllables:
s.id = i
i += 1
return reading
......
......@@ -121,6 +121,13 @@ class WordList:
self.cache_analyses(morpheus_analyses)
else:
self.unknown_forms.add(form)
if not self.form_analyses[form] and form[0].isupper():
# Try to look up the non-capitalized version of the form.
analyses = self.analyze(form.lower())
if analyses:
self.cache_analyses({form: analyses})
return self.form_analyses[form]
def load_from_db(self, form: str) -> Set[FormAnalysis]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment