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]