ZGen  0.2.0
a linearization system for natural language.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
ZGen::Engine::PennTreebankPostagAlphabet Class Reference

#include <postag_alphabet.h>

Inheritance diagram for ZGen::Engine::PennTreebankPostagAlphabet:
ZGen::Engine::InmutableAlphabet

Public Types

enum  PENN_POS_ID {
  NONE = 0, BEGIN, END, DOLLAR,
  L_QUOTE, R_QUOTE, L_BRACKET, R_BRACKET,
  COMMA, PERIOD, COLUM, SHARP,
  CC, CD, DT, EX,
  FW, IN, JJ, JJR,
  JJS, LS, MD, NN,
  NNP, NNPS, NNS, NP,
  PDT, POS, PRP, PRP_DOLLAR,
  RB, RBR, RBS, RP,
  SYM, TO, UH, VB,
  VBD, VBG, VBN, VBP,
  VBZ, WDT, WP, WP_DOLLAR,
  WRB, kMaxIndexOfPosTag
}
 

Public Member Functions

const char * decode (int id) const
 
int encode (const char *name) const
 
- Public Member Functions inherited from ZGen::Engine::InmutableAlphabet
 InmutableAlphabet ()
 

Static Public Attributes

static const char * PENN_POS_NAME []
 

Member Enumeration Documentation

Enumerator
NONE 
BEGIN 
END 
DOLLAR 
L_QUOTE 
R_QUOTE 
L_BRACKET 
R_BRACKET 
COMMA 
PERIOD 
COLUM 
SHARP 
CC 
CD 
DT 
EX 
FW 
IN 
JJ 
JJR 
JJS 
LS 
MD 
NN 
NNP 
NNPS 
NNS 
NP 
PDT 
POS 
PRP 
PRP_DOLLAR 
RB 
RBR 
RBS 
RP 
SYM 
TO 
UH 
VB 
VBD 
VBG 
VBN 
VBP 
VBZ 
WDT 
WP 
WP_DOLLAR 
WRB 
kMaxIndexOfPosTag 

Member Function Documentation

const char * ZGen::Engine::PennTreebankPostagAlphabet::decode ( int  id) const
virtual

Get the Postag name for the index.

Parameters
[in]idThe encoded index.
Returns
const char* The name for the postag.

Implements ZGen::Engine::InmutableAlphabet.

int ZGen::Engine::PennTreebankPostagAlphabet::encode ( const char *  name) const
virtual

Get the index for the certain name.

Parameters
[in]nameThe name.
Returns
int The encoded index.

Implements ZGen::Engine::InmutableAlphabet.

Member Data Documentation

const char * ZGen::Engine::PennTreebankPostagAlphabet::PENN_POS_NAME
static
Initial value:
= {
"-NONE-",
"-BEGIN-",
"-END-",
"$", "``", "''",
"-LRB-", "-RRB-", ",",
".", ":", "#",
"CC", "CD", "DT", "EX", "FW",
"IN", "JJ", "JJR", "JJS", "LS",
"MD", "NN", "NNP", "NNPS", "NNS", "NP",
"PDT", "POS", "PRP", "PRP$",
"RB", "RBR", "RBS", "RP",
"SYM", "TO", "UH",
"VB", "VBD", "VBG", "VBN", "VBP", "VBZ",
"WDT", "WP", "WP$", "WRB"
}

The documentation for this class was generated from the following files: