public class Chunk extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
begin |
List<Word> |
cause |
int |
end |
boolean |
is_merged |
List<Word> |
pros |
List<Word> |
trigs |
String |
txt |
String |
type |
| Modifier and Type | Method and Description |
|---|---|
void |
addPro(Word pr)
Add protein
|
void |
addTrigger(Word trg)
Add trigger
|
void |
addWord(String w) |
boolean |
contains(Word key) |
List<Word> |
getInChunkPro(Word tg,
String[] tokens)
Get in_chunk pro for a given tg
|
List<Word> |
getPro(String[] tokens)
12.10.2011
Get pro list in form TG_PRO for strict case (no other trigger in between)
|
List<Word> |
getPro(Word tg,
String[] tokens)
Get pros (same chunk with trg) that follow the given trigger for pattern: TG - PR
This method is used in case there is no prep or trg has JJ/VBx form in noun chunk
|
List<Word> |
getProFront()
12.10.2011
Get pro list for strict case (no other trigger in between)
|
String |
getText() |
String |
getType() |
String |
getValues() |
boolean |
inChunk(Word trg,
Word pro)
Check TG and Pro in the same chunk, for use with learning rules
|
boolean |
inChunk(Word trg,
Word pro,
String[] tokens)
Check TG and Pro in the same chunk, for use with learning rules
|
boolean |
inChunkTG(Word tg1,
Word tg2)
Check two trg in the same chunk, without any pro in between of them
|
boolean |
is_inChunk(Word trg,
String[] tokens)
Check whether a trg has in_chunk form
|
boolean |
isQualify() |
boolean |
isSameRole(Word tg1,
Word tg2,
String[] tokens) |
void |
merge(Chunk c)
Merge two chunks: appending a chunk to the current chunk
|
void |
removePro(int pos) |
void |
removePRO(Word pro) |
void |
removeTRG(Word tg) |
String |
toString() |
public String type
public String txt
public int begin
public int end
public boolean is_merged
public Chunk(String type)
public void addWord(String w)
public void addPro(Word pr)
public void addTrigger(Word trg)
trg - public String getType()
public String getText()
public void merge(Chunk c)
c - :chunkpublic void removeTRG(Word tg)
public void removePRO(Word pro)
public void removePro(int pos)
public boolean isQualify()
public boolean contains(Word key)
public boolean inChunkTG(Word tg1, Word tg2)
tg1 - tg2 - public boolean inChunk(Word trg, Word pro)
trg - pro - public boolean inChunk(Word trg, Word pro, String[] tokens)
trg - pro - public boolean is_inChunk(Word trg, String[] tokens)
trg - public List<Word> getInChunkPro(Word tg, String[] tokens)
tg: - trgtags: - POS tagspublic List<Word> getPro(String[] tokens)
tags - tokens - public List<Word> getProFront()
tags - tokens - public List<Word> getPro(Word tg, String[] tokens)
tg: - triggerpublic String getValues()
Copyright © 2016 JULIE Lab, Germany. All rights reserved.