Skip to content

Commit

Permalink
Aligns knockout-criterion method name with return value
Browse files Browse the repository at this point in the history
  • Loading branch information
gremid committed Oct 12, 2024
1 parent 5e01ee5 commit 621efad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quaxa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SentenceScorer:
penalty_deixis: float = 0.034

def score_sentence(self, sent: Span, headword=None) -> float:
score = 0.5 * self.has_a_knockout_criterion(sent)
score = 0.5 * self.has_no_knockout_criterion(sent)
score += 0.5 * self.factor_gradual_criteria(sent, headword)
return score

Expand All @@ -48,7 +48,7 @@ def __call__(self, doc: Doc, headword=None) -> Doc:
sent._.quaxa = self.score_sentence(sent, headword)
return doc

def has_a_knockout_criterion(self, sent):
def has_no_knockout_criterion(self, sent):
if self.has_illegal_chars(sent):
return False
if self.is_misparsed(sent):
Expand Down

0 comments on commit 621efad

Please sign in to comment.