Excercises:日本語コーパスを使った検索の練習帖

 

  1. PPの配下にあるのは? NP?

  2. PP配下にあるIP-ADVを調べる

  3. PP配下にあるIP-ADVを調べる②

  4. PP配下にあるIP-ADVを調べる ③:タラ条件文はどこに?

  5. PP配下にあるADVPを調べる

  6. PP配下にあるCP-THTを調べる

  7. IP-RELの上位下位のノードは何?

  8. IPの配下にある要素とは?
  9. ノードの関係から全体図を書いてみる

Phrase Label

 

A
ADVP adverb phrase 副詞句
B
CND* conditional 条件
CONJ* coordinate conjunction 並列接続
CONJP conjunction phrase 句接続詞句
CP-EXL exclamative 感嘆節
CP-FINAL projection for sentence final particle 終助詞節
CP-QUE question 疑問節
CP-THT complementizer clause 補部節
F
FRAG fragment 断片
FRAG-IMP imperative with fragment 断片による命令文
FS false start 開始誤り
I
INTJP interjection phrase 間投詞句
IP-ADV adverbial clause 副詞節
IP-EMB gapless noun-modifying clause 空所なし名詞修飾節
IP-IMP imperative clause 命令節
IP-SMC small clause 小節
IP-MAT matrix clause 主節
IP-REL relative clause 関係節
IP-SUB clause under CP layer 準主節
IP-NML nominalized clause 名詞化節
M
multi-sentence multiple sentence 多重文
N
NML intermediate nominal layer 中間名詞句
NP noun phrase 名詞句
NP-ADV adverbial noun phrase 副詞的名詞句
NP-LGS logical subject noun phrase 論理的主語名詞句
NP-LOC locational noun phrase 場所名詞句
NP-MSR measure noun phrase 数量名詞句
NP-OB1 noun phrase, first object 名詞句;第一目的語
NP-OB2 noun phrase, second object 名詞句;第二目的語
NP-PRD predicate noun phrase 述語名詞句
NP-SBJ noun phrase, subject 名詞句;主語
NP-SBJ2 noun phrase, second subject 名詞句;第二主語
NP-TMP temporal noun phrase 時間名詞句
NP-TPC noun phrase, topic 名詞句;主題
NP-VOC vocative noun phrase 呼格名詞句
NUMCLP numeral-classifier phrase 助数詞句
P
PNLP prenominal phrase 連体句
PP particle phrase 助詞句
PP-PRP purpositive particle phrase 目的助詞句
PRN parenthetical 括弧挿入句
S
SCON subordinate conjunction 従属接続

 

Tregex Patterns:検索パターン一覧

検索パターンは下記。よく使われるのは、支配関係、先後関係、親子関係、姉妹関係。使用方法は練習帳を。

*オリジナルサイトは、TregexPattern (Stanford JavaNLP API) 

Symbol Meaning
  支配関係
A < B A immediately dominates B
(AがBを直接支配)
A > B A is immediately dominated by B
(AはBによって直接に支配されている)
A << B A dominates B
(AがBを支配)
A >> B A is dominated by B
(AはBによって支配されている)
  先後関係
A . B A immediately precedes B
(AはBに直前先行)
A .. B A precedes B
(AはBに単純先行)
A , B A immediately follows B
(AはBに直後後行)
A ,, B A follows B
(AはBに単純後行)
  親子関係
A <, B B is the first child of A
(BはAの長子)
B >, A B is the first child of A
(BはAの長子)
A <- B B is the last child of A
(BはAの末子)
B >- A B is the last child of A
(BはAの末子)
A <` B B is the last child of A
(BはAの末子)
B >` A A is the last child of B
(BはAの末子)
A <: B B is the only child of A
(BはAの「一人っ子」)
B >: A B is the only child of A
(BはAの「一人っ子」)
A <i B B is the ith child of A (i > 0)
A >i B A is the ith child of B (i > 0)
A <-i B B is the ith-to-last child of A (i > 0)
A >-i B A is the ith-to-last child of B (i > 0)
  姉妹関係
A $ B A is a sister of B (and not equal to B)
(AとBは姉妹)
A $++ B A is a left sister of B (same as $.. for context-free trees)
(AはBの姉)
A $-- B A is a right sister of B (same as $,, for context-free trees)
(AはBの妹)
A $+ B A is the immediate left sister of B (same as $. for context-free trees)
(AはBのすぐ上の姉)
A $- B A is the immediate right sister of B (same as $, for context-free trees)
(AはBのすぐ下の妹)
  <姉妹関係の異なる表現>
A $.. B A is a sister of B and precedes B
(AはBの姉)
A $,, B A is a sister of B and follows B
(AはBの妹)
A $. B A is a sister of B and immediately precedes B
(AはBのすぐ上の姉)
A $, B A is a sister of B and immediately follows B
(AはBのすぐ下の妹)
  派生関係
A <<, B B is a leftmost descendent of A
A <<- B B is a rightmost descendent of A
A >>, B A is a leftmost descendent of B
A >>- B A is a rightmost descendent of B
A <<: B A dominates B via an unbroken chain (length > 0) of unary local trees.
A >>: B A is dominated by B via an unbroken chain (length > 0) of unary local trees.
  その他
A <+(C) B A dominates B via an unbroken chain of (zero or more) nodes matching description C
A >+(C) B A is dominated by B via an unbroken chain of (zero or more) nodes matching description C
A .+(C) B A precedes B via an unbroken chain of (zero or more) nodes matching description C
A ,+(C) B A follows B via an unbroken chain of (zero or more) nodes matching description C
A <<# B B is a head of phrase A
A >># B A is a head of phrase B
A <# B B is the immediate head of phrase A
A ># B A is the immediate head of phrase B
A == B A and B are the same node
A : B [this is a pattern-segmenting operator that places no constraints on the relationship between A and B]

IPの配下にある要素とは?

tregex: IP-MAT : 4241

tregex: IP-MAT < @PP : 6294

tregex: IP-MAT < /VB/ :4496

tregex: P-MAT < /ADJ/ : 345

tregex: IP-MAT < @NP : 7010

 

tregex: IP-MAT !< @PP : 649

tregex: IP-MAT !< @PP & !< @NP : 19

tregex: IP-MAT !< @PP & !< @NP !< @multi : 14

tregex: IP-MAT !< @PP & !< @NP !< @multi !< IP-ADV : 13

tregex: IP-MAT !< @PP & !< @NP !< @multi !< IP-ADV !< @CP : 7

tregex: IP-MAT !< @PP & !< @NP !< @multi !< IP-ADV !< @CP !< SYM : 3

tregex: IP-MAT !< @PP & !< @NP !< @multi !< IP-ADV !< @CP !< SYM !< PU : 2

最後に残った2つの要素とは、

f:id:seki440:20180726005555p:plain

"news_KAHOKU_481" on Keyaki Treebank