Ejemplo n.º 1
0
        public int getWordID(Word word)
        {
            UnigramProbability unigram = this.getUnigram(word);

            if (unigram == null)
            {
                string text = new StringBuilder().append("No word ID: ").append(word).toString();

                throw new IllegalArgumentException(text);
            }
            return(unigram.getWordID());
        }