Whitespace fixes

This commit is contained in:
Ozbolt Menegatti 2019-06-02 13:51:32 +02:00
parent 460a55cb6c
commit 2c8a9f0ed0

View File

@ -231,6 +231,7 @@ class WordFormMsdCR(WordFormAnyCR):
if 'msd' not in self.data: if 'msd' not in self.data:
return True return True
selectors = self.data['msd'] selectors = self.data['msd']
for key, value in selectors.items(): for key, value in selectors.items():
t = word.msd[0] t = word.msd[0]
v = TAGSET[t].index(key.lower()) v = TAGSET[t].index(key.lower())
@ -256,6 +257,7 @@ class WordFormMsdCR(WordFormAnyCR):
WordLemma = namedtuple('WordLemmaOnly', 'msd most_frequent_text lemma text') WordLemma = namedtuple('WordLemmaOnly', 'msd most_frequent_text lemma text')
backup_word = WordLemma(msd=msd, most_frequent_text=lambda *x: None, lemma=None, text=None) backup_word = WordLemma(msd=msd, most_frequent_text=lambda *x: None, lemma=None, text=None)
self.words.append(backup_word) self.words.append(backup_word)
return super()._render() return super()._render()
class WordFormAgreementCR(WordFormMsdCR): class WordFormAgreementCR(WordFormMsdCR):
@ -267,7 +269,6 @@ class WordFormAgreementCR(WordFormMsdCR):
return self.data['other'] return self.data['other']
def match(self, word_msd): def match(self, word_msd):
existing = [(w.msd, w.text) for w in self.words] existing = [(w.msd, w.text) for w in self.words]
for candidate_msd, candidate_text in self.word_renderer.available_words(self.lemma, existing): for candidate_msd, candidate_text in self.word_renderer.available_words(self.lemma, existing):
@ -324,7 +325,6 @@ class ComponentRendition:
self.more = {} self.more = {}
self.representation_factory = ComponentRepresentation self.representation_factory = ComponentRepresentation
def add_feature(self, feature): def add_feature(self, feature):
if 'rendition' in feature: if 'rendition' in feature:
if feature['rendition'] == "lemma": if feature['rendition'] == "lemma":