Loading allzweckmesser/scanner.py +4 −0 Original line number Diff line number Diff line Loading @@ -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 Loading allzweckmesser/wordlist.py +7 −0 Original line number Diff line number Diff line Loading @@ -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]: Loading Loading
allzweckmesser/scanner.py +4 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
allzweckmesser/wordlist.py +7 −0 Original line number Diff line number Diff line Loading @@ -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]: Loading