Constituency Parsing¶
Constituency Parsing related modeling class
-
class
pororo.tasks.constituency_parsing.
PororoConstFactory
(task: str, lang: str, model: Optional[str])[source]¶ Bases:
pororo.tasks.utils.base.PororoFactoryBase
Constituency parsing using Transformer model
English (transformer.base.en.const)
dataset: OntoNotes 5.0
metric: TBU
Korean (transformer.base.en.const)
dataset: Sejong Corpus
metric: TBU
Chinese (transformer.base.zh.const)
dataset: OntoNotes 5.0
metric: TBU
- Parameters
- Returns
result of constituency parsing
- Return type
result
Examples
>>> const = Pororo(task="const", lang="en") >>> const("I love this place") <TOP> <S> <NP>I</NP> <VP> love <NP>this place</NP> </VP> </S> </TOP> >>> const = Pororo(task="const", lang="zh") >>> const("我喜欢饼干") <TOP> <IP> <NP>我</NP> <VP> 喜欢 <NP>饼干</NP> </VP> </IP> </TOP> >>> const = Pororo(task="const", lang="ko") >>> const("미국에서도 같은 우려가 나오고 있다.") <S> <NP_AJT>미국/NNP+에서/JKB+도/JX</NP_AJT> <S> <NP_SBJ> <VP_MOD>같/VA+은/ETM</VP_MOD> <NP_SBJ>우려/NNG+가/JKS</NP_SBJ> </NP_SBJ> <VP> <VP>나오/VV+고/EC</VP> <VP>있/VX+다/EF+./SF</VP> </VP> </S> </S>
-
class
pororo.tasks.constituency_parsing.
PororoConstBase
(config: pororo.tasks.utils.base.TaskConfig)[source]¶ Bases:
pororo.tasks.utils.base.PororoTaskBase
Constituency Parsing base class containinig various methods related to Const. Parsing