Skip to content

Commit

Permalink
]ci skip] past irregular
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Oct 24, 2024
1 parent d92a229 commit 81fd83f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion batchalign/pipelines/morphosyntax/ud.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ def handler__VERB(word, lang=None):
polarity = feats.get("Polarity", "")
polite = feats.get("Polite", "")

irr = False
if lang == "en" and tense == "Past":
from batchalign.pipelines.morphosyntax.en.irr import is_irregular
irr = is_irregular(word.lemma, word.text)
irr = "irr" if irr else ""


res = handler(word, lang)
if "sconj" in res:
return res
Expand All @@ -256,7 +263,7 @@ def handler__VERB(word, lang=None):
else:
return res+flag+stringify_feats(aspect, mood,
tense, polarity, polite,
number[:1]+person)
number[:1]+person, irr)

def handler__actual_PUNCT(word, lang=None):
# actual punctuation handler
Expand Down
4 changes: 2 additions & 2 deletions batchalign/version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
0.7.6-alpha.18
0.7.6-alpha.19
October 16, 2024
fixing asr for file names
past irregular
2 changes: 1 addition & 1 deletion scratchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

# # from batchalign.models import BertUtteranceModel
# from batchalign.pipelines import BatchalignPipeline
# forms, delim = chat_parse_utterance("who is that ?", None, None, None, None)
# forms, delim = chat_parse_utterance("who farted that ?", None, None, None, None)
# utterance = Utterance(content=forms, delim=delim)
# ut = Document(content=[utterance], langs=["eng"])
# pipe = BatchalignPipeline.new("morphosyntax", "eng")
Expand Down

0 comments on commit 81fd83f

Please sign in to comment.