|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthultig.sumo.ChunkType
public class ChunkType
Represents a chunk type obtained from a shallow parser. The tag set
used is the Penn Treebank.
Only six different tags are considered here for sentence chunks:
NP, VP, PP, PRT, ADVP
, and UNDEFINED
. In the future more
chunk tags can be added/defined.
University of Beira Interior (UBI)
Centre For Human Language Technology and Bioinformatics (HULTIG)
Field Summary | |
---|---|
static int |
ADVP
The code representing an Adverb Phrase. |
static String[] |
DOMAIN
The set of string tags for labeling chunks, stored in this array of strings. |
static int |
NP
The code representing a Noun Phrase. |
static int |
PP
The code representing a Prepositional Phrase. |
static int |
PRT
The code representing a particle. |
static int |
UND
Internal representation of an undefined chunk. |
static int |
VP
The code representing a Verb Phrase. |
Constructor Summary | |
---|---|
ChunkType()
|
Method Summary | |
---|---|
static String |
cod2str(int cod)
Giving the tag codes defined in this class (static fields), converts a tag code into its corresponding string. |
static void |
main(String[] args)
This main method lists the set of chunk tags and their corresponding codes. |
static int |
str2cod(String scod)
Gives the tag code corresponding to a given chunk tag, taking into account the defined internal codes, in this class (the static int fields). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UND
public static final int NP
public static final int VP
public static final int PP
public static final int PRT
public static final int ADVP
public static final String[] DOMAIN
Constructor Detail |
---|
public ChunkType()
Method Detail |
---|
public static int str2cod(String scod)
scod
- The chunk tag string.
UND
code (undefined/not known) if the string is not recognizable.
returnpublic static String cod2str(int cod)
cod
- The chunk tag code.
public static void main(String[] args)
args
- No arguments are expected.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |