Sennaは、ニューラル ネットワークを使用して構築された NLP ツールであり、次のことができます。
- POSタグ付け
- NERタグ付け
- チャンクのタグ付け
- セマンティック ロール ラベルのタグ付けと
- 解析中
http://ml.nec-labs.com/senna/download.htmlからプリコンパイル済みパッケージをダウンロードした後
メニューを実行し--help
て、オプションを確認しました。
alvas@ubi:~/senna$ ./senna-linux64 --help
invalid argument: --help
SENNA Tagger (POS - CHK - NER - SRL)
(c) Ronan Collobert 2009
Usage: ./senna-linux64 [options]
Takes sentence (one line per sentence) on stdin
Outputs tags on stdout
Typical usage: ./senna-linux64 [options] < inputfile.txt > outputfile.txt
Display options:
-h Display this help
-verbose Display model informations on stderr
-notokentags Do not output tokens
-offsettags Output start/end offset of each token
-iobtags Output IOB tags instead of IOBES
-brackettags Output 'bracket' tags instead of IOBES
Data options:
-path <path> Path to the SENNA data/ and hash/ directories [default: ./]
Input options:
-usrtokens Use user's tokens (space separated) instead of SENNA tokenizer
SRL options:
-posvbs Use POS verbs instead of SRL style verbs for SRL task
-usrvbs <file> Use user's verbs (given in <file>) instead of SENNA verbs for SRL task
Tagging options:
-pos Output POS
-chk Output CHK
-ner Output NER
-srl Output SRL
-psg Output PSG
コマンドライン インターフェイスは単純明快で、POS および NER タグの出力も簡単に解釈できます。
この入力を考えると:
alvas@ubi:~/senna$ cat test.in
Foo went to eat bar at the Foobar.
これは標準の Penn Treebank タグセットです。
alvas@ubi:~/senna$ ./senna-linux64 -pos < test.in
Foo NNP
went VBD
to TO
eat VB
bar NN
at IN
the DT
Foobar NNP
. .
そして、これはBIO タグセットです:
alvas@ubi:~/senna$ ./senna-linux64 -ner < test.in
Foo S-PER
went O
to O
eat O
bar O
at O
the O
Foobar S-LOC
. O
また、チャンキングについては、私たちが慣れ親しんでいるある種のBIOE タグセットでもあります。
alvas@ubi:~/senna$ ./senna-linux64 -chk < test.in
Foo S-NP
went B-VP
to I-VP
eat E-VP
bar S-NP
at S-PP
the B-NP
Foobar E-NP
. O
しかし、S-
タグは何を意味するのでしょうか? 単一のトークン チャンクであるトークンにのみ添付されているようですが、本当ですか?
SRL タグは少し奇妙で、トークンごとに複数の注釈があります。
alvas@ubi:~/senna$ ./senna-linux64 -srl < test.in
Foo - S-A1 S-A0
went went S-V O
to - B-AM-PNC O
eat eat I-AM-PNC S-V
bar - I-AM-PNC S-A1
at - I-AM-PNC B-AM-LOC
the - I-AM-PNC I-AM-LOC
Foobar - E-AM-PNC E-AM-LOC
. - O O
セマンティックフレームから得られる「タプルのような」出力のように見えますが、規則がわかりません-AM-
。は何-PNC
ですか?
出力は何を意味し、どのように解釈する必要がありますか?
パーサー出力の場合:
alvas@ubi:~/senna$ ./senna-linux64 -psg < test.in
Foo (S1(S(NP*)
went (VP*
to (S(VP*
eat (VP*
bar (ADVP*)
at (PP*
the (NP*
Foobar *))))))
. *))
解析で見られるブラケット付きの解析出力のように見えますが、これはどういう*
意味ですか?