0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ポルトガル語の縮約冠詞は係り受け解析においてどう扱うべきなのか

0
Posted at

Hiroshi Matsuda, Chunpeng Ma, Masayuki Asahara『Step-by-step Instructions and a Simple Tabular Output Format Improve the Dependency Parsing Accuracy of LLMs』が非常に面白かったのだが、対象とするUniversal Dependenciesがアラビア語・ブルガリア語・カタルーニャ語・チェコ語・ドイツ語・英語・スペイン語・フランス語・イタリア語・日本語・韓国語・オランダ語・ノルウェー語(ブークモール)・ルーマニア語・ロシア語・スロベニア語・中国語(簡化字)で、ポルトガル語が含まれていないのが私(安岡孝一)個人としては残念だった。というのも、ポルトガル語の縮約冠詞は、この手の言語処理において、かなりの難題だと私には思えるからだ。極端な例として「Foi quebrado pelo pelo do gato」を、Stanzaで係り受け解析してみよう。Google Colaboratoryだと、こんな感じ。

!pip install stanza deplacy
import stanza
nlp=stanza.Pipeline("pt")
doc=nlp("Foi quebrado pelo pelo do gato")
import deplacy
deplacy.serve(doc,port=None)

私の手元では、以下の結果が出力された。

# text = Foi quebrado pelo pelo do gato
# sent_id = 0
# constituency = (ROOT (S (VP (AUX Foi) (VP (VERB quebrado) (PP (ADP por) (NP (DET o) (N' (NOUN pelo) (PP (ADP de) (NP (DET o) (NOUN gato))))))))))
1	Foi	ser	AUX	_	Mood=Ind|Number=Sing|Person=3|Tense=Past|VerbForm=Fin	2	aux:pass	_	start_char=0|end_char=3
2	quebrado	quebrar	VERB	_	Gender=Masc|Number=Sing|VerbForm=Part|Voice=Pass	0	root	_	start_char=4|end_char=12
3-4	pelo	_	_	_	_	_	_	_	start_char=13|end_char=17
3	por	por	ADP	_	_	5	case	_	_
4	o	o	DET	_	Definite=Def|Gender=Masc|Number=Sing|PronType=Art	5	det	_	_
5	pelo	pelo	NOUN	_	Gender=Masc|Number=Sing	2	obl:agent	_	start_char=18|end_char=22
6-7	do	_	_	_	_	_	_	_	start_char=23|end_char=25
6	de	de	ADP	_	_	8	case	_	_
7	o	o	DET	_	Definite=Def|Gender=Masc|Number=Sing|PronType=Art	8	det	_	_
8	gato	gato	NOUN	_	Gender=Masc|Number=Sing	5	nmod	_	start_char=26|end_char=30|SpaceAfter=No

pt.png

1つ目の「pelo」は縮約冠詞なので、内部的には「por」と「o」の2語に分かれている。一方、2つ目の「pelo」は名詞なので、分かれたりはしない。その次の「do」は縮約冠詞なので、内部的には「de」と「o」の2語に分かれている。Stanzaはポルトガル語モジュールをガチに組んでいて、このあたりの言語処理に強いのだが、これを言語モデルに教えこもうとすると、現時点の私にとってはかなり難題だったりする。さて、何かいい方法あるかなぁ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?