ca.uottawa.balie
Class POSLookup

java.lang.Object
  extended byca.uottawa.balie.POSLookup

public class POSLookup
extends java.lang.Object

Lookup for part-of-speeches. Comes from two sources:

Author:
nadeaud

Constructor Summary
POSLookup(LanguageSpecific pi_LanguageSpecific)
          Loads qTag module, for on-the-fly tagging as well as a list of hard-coded POS.
 
Method Summary
 int[] GetPartOfSpeech(java.util.ArrayList pi_WordList)
          Guess the POS of every element of a list of tokens.
 int[] GetPartOfSpeech(java.lang.String[] pi_Words)
          Guess the POS of every element of a list of tokens.
static void main(java.lang.String[] args)
          Main can be called to train the external module qTag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POSLookup

public POSLookup(LanguageSpecific pi_LanguageSpecific)
Loads qTag module, for on-the-fly tagging as well as a list of hard-coded POS.

Parameters:
pi_LanguageSpecific - The class that contains language specific informations
Method Detail

GetPartOfSpeech

public int[] GetPartOfSpeech(java.util.ArrayList pi_WordList)
Guess the POS of every element of a list of tokens.

Parameters:
pi_WordList - An arraylist of preprocessed tokens (the wordlist is found in the TokenList)
Returns:
an array of integer representing each token POS. (See TokenConsts for POS enumeration)
See Also:
TokenList, TokenConsts

GetPartOfSpeech

public int[] GetPartOfSpeech(java.lang.String[] pi_Words)
Guess the POS of every element of a list of tokens.

Parameters:
pi_Words - An array of preprocessed (canonized) tokens.
Returns:
an array of integer representing each token POS. (See TokenConsts for POS enumeration)
See Also:
TokenConsts

main

public static void main(java.lang.String[] args)
Main can be called to train the external module qTag. Training qTag requires a POS corpus (not included with Balie) qTag is delivered in Balie with trained models for each languages. This function should therefore not be called by the end user.

Parameters:
args -