diff options
| author | Chris Dyer <cdyer@cab.ark.cs.cmu.edu> | 2012-10-02 00:19:43 -0400 | 
|---|---|---|
| committer | Chris Dyer <cdyer@cab.ark.cs.cmu.edu> | 2012-10-02 00:19:43 -0400 | 
| commit | e26434979adc33bd949566ba7bf02dff64e80a3e (patch) | |
| tree | d1c72495e3af6301bd28e7e66c42de0c7a944d1f /gi/posterior-regularisation/prjava/src/phrase/Lexicon.java | |
| parent | 0870d4a1f5e14cc7daf553b180d599f09f6614a2 (diff) | |
cdec cleanup, remove bayesian stuff, parsing stuff
Diffstat (limited to 'gi/posterior-regularisation/prjava/src/phrase/Lexicon.java')
| -rw-r--r-- | gi/posterior-regularisation/prjava/src/phrase/Lexicon.java | 34 | 
1 files changed, 0 insertions, 34 deletions
diff --git a/gi/posterior-regularisation/prjava/src/phrase/Lexicon.java b/gi/posterior-regularisation/prjava/src/phrase/Lexicon.java deleted file mode 100644 index a386e4a3..00000000 --- a/gi/posterior-regularisation/prjava/src/phrase/Lexicon.java +++ /dev/null @@ -1,34 +0,0 @@ -package phrase; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class Lexicon<T> -{ -	public int insert(T word) -	{ -		Integer i = wordToIndex.get(word); -		if (i == null) -		{ -			i = indexToWord.size(); -			wordToIndex.put(word, i); -			indexToWord.add(word); -		} -		return i; -	} - -	public T lookup(int index) -	{ -		return indexToWord.get(index); -	} - -	public int size() -	{ -		return indexToWord.size(); -	} - -	private Map<T, Integer> wordToIndex = new HashMap<T, Integer>(); -	private List<T> indexToWord = new ArrayList<T>(); -}
\ No newline at end of file  | 
