info.ephyra.nlp.indices
Class Prepositions

java.lang.Object
  extended by info.ephyra.nlp.indices.Prepositions

public class Prepositions
extends java.lang.Object

A dictionary of prepositions in English.

Internally, it uses an instance of HashDictionary to store the words.

Version:
2007-04-14
Author:
Nico Schlaefer

Field Summary
private static Dictionary dictionary
          The dictionary containing the prepositions.
 
Constructor Summary
Prepositions()
           
 
Method Summary
static boolean loadIndex(java.lang.String filename)
          Creates the dictionary from a list of prepositions in a file.
static boolean lookup(java.lang.String word)
          Looks up a word in the dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dictionary

private static Dictionary dictionary
The dictionary containing the prepositions.

Constructor Detail

Prepositions

public Prepositions()
Method Detail

loadIndex

public static boolean loadIndex(java.lang.String filename)
Creates the dictionary from a list of prepositions in a file.

Parameters:
filename - file containing the prepositions
Returns:
true, iff the prepositions were loaded successfully

lookup

public static boolean lookup(java.lang.String word)
Looks up a word in the dictionary.

Parameters:
word - the word to look up
Returns:
true, iff it is a preposition