ch.uzh.ifi.attempto.acewiki.aceowl
Class ACEOWLLexicon

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.aceowl.ACEOWLLexicon
All Implemented Interfaces:
DynamicLexicon

public class ACEOWLLexicon
extends java.lang.Object
implements DynamicLexicon

This class manages the lexical entries for AceWiki.

Author:
Tobias Kuhn

Constructor Summary
ACEOWLLexicon()
          Creates a new lexicon manager.
 
Method Summary
 java.util.Collection<LexicalRule> getLexRules(AbstractOption option)
          This method should return the lexical rules for the given abstract option.
 java.util.Collection<LexicalRule> getLexRules(java.lang.String word)
          This method should return the lexical rules with the given word (terminal category).
 void init(Ontology ontology)
          This is the first method to be called and provides the ontology object.
static boolean isValidWordOrEmpty(java.lang.String s)
          Returns true if the string represents a valid word form.
static java.lang.String normalize(java.lang.String s)
          Normalizes the string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACEOWLLexicon

public ACEOWLLexicon()
Creates a new lexicon manager.

Method Detail

init

public void init(Ontology ontology)
This is the first method to be called and provides the ontology object.

Parameters:
ontology - The ontology object.

getLexRules

public java.util.Collection<LexicalRule> getLexRules(AbstractOption option)
Description copied from interface: DynamicLexicon
This method should return the lexical rules for the given abstract option. Lexical rules that do not comply with this abstract option are filtered out afterwards. This method is used for the prediction of possible next tokens. The returned collection does not need to be complete. For open word classes (e.g. string and numbers) just a subset of all possible lexicon entries can be returned.

Specified by:
getLexRules in interface DynamicLexicon
Parameters:
option - The abstract option.
Returns:
The lexical rules for the given abstract option.

getLexRules

public java.util.Collection<LexicalRule> getLexRules(java.lang.String word)
Description copied from interface: DynamicLexicon
This method should return the lexical rules with the given word (terminal category). Lexical rules with a different word are filtered out afterwards.

Specified by:
getLexRules in interface DynamicLexicon
Parameters:
word - The word.
Returns:
The lexical rules with the given word as their terminal category.

isValidWordOrEmpty

public static boolean isValidWordOrEmpty(java.lang.String s)
Returns true if the string represents a valid word form.

Parameters:
s - The string.
Returns:
true if the string represents a valid word form.

normalize

public static java.lang.String normalize(java.lang.String s)
Normalizes the string. White space characters are replaced by underscores.

Parameters:
s - The input string.
Returns:
The normalized string.


Copyright 2008-2012, AceWiki developers