Relocate special case logic
This commit is contained in:
parent
be47717638
commit
dcb425b066
|
@ -73,9 +73,6 @@ class Jitenon:
|
||||||
|
|
||||||
def _headwords(self):
|
def _headwords(self):
|
||||||
words = []
|
words = []
|
||||||
if self.expression == "金棒引き・鉄棒引き":
|
|
||||||
# special case
|
|
||||||
return [["金棒引き", "かなぼうひき"], ["金棒引き", "かなぼうひき"]]
|
|
||||||
for yomikata in self.__yomikatas():
|
for yomikata in self.__yomikatas():
|
||||||
headword = [self.expression, yomikata]
|
headword = [self.expression, yomikata]
|
||||||
if headword in words:
|
if headword in words:
|
||||||
|
|
|
@ -32,3 +32,10 @@ class JitenonKotowaza(Jitenon):
|
||||||
]
|
]
|
||||||
terms.append(term)
|
terms.append(term)
|
||||||
return terms
|
return terms
|
||||||
|
|
||||||
|
def _headwords(self):
|
||||||
|
if self.expression == "金棒引き・鉄棒引き":
|
||||||
|
return [["金棒引き", "かなぼうひき"],
|
||||||
|
["鉄棒引き", "かなぼうひき"]]
|
||||||
|
else:
|
||||||
|
return Jitenon._headwords(self)
|
||||||
|
|
Loading…
Reference in a new issue