Morphological Inflection¶
Morphological Inflection related modeling class
-
class
pororo.tasks.morph_inflection.
PororoInflectionFactory
(task: str, lang: str, model: Optional[str])[source]¶ Bases:
pororo.tasks.utils.base.PororoFactoryBase
Conduct Morphological inflection
English (enparadigm)
dataset: TBU
metric: N/A
Korean (koparadigm)
dataset: KoParadigm (Park et al. 2020)
metric: N/A
Japanese (japaradigm)
dataset: TBU
metric: N/A
- Parameters
text (str) – input text to be morphologically inflected
- Returns
morphogical inflection token list
- Return type
Examples
>>> inflection = Pororo(task="inflection", lang="ko") >>> inflection("곱") [['Action Verb', [('거나', '곱거나'), ('거늘', '곱거늘'), ('거니', '곱거니') ...]]] >>> inflection = Pororo(task="inflection", lang="en") >>> inflection("love") {'NN': [('loves', 'NNS')], 'VB': [('loves', 'VBZ'), ('loved', 'VBD'), ('loved', 'VBN'), ('loving', 'VBG')]} >>> inflection = Pororo(task="inflection", lang="ja") >>> inflection("あえぐ") {'verb': [('あえが', '未然形'), ('あえご', '未然ウ接続'), ('あえぎ', '連用形'), ('あえい', '連用タ接続'), ('あえげ', '仮定形'), ('あえげ', '命令e'), ('あえぎゃ', '仮定縮約1')]}
-
class
pororo.tasks.morph_inflection.
PororoKoParadigm
(model, config)[source]¶ Bases:
pororo.tasks.utils.base.PororoSimpleBase