Example usage for opennlp.tools.ngram NGramModel remove

List of usage examples for opennlp.tools.ngram NGramModel remove

Introduction

In this page you can find the example usage for opennlp.tools.ngram NGramModel remove.

Prototype

public void remove(StringList tokens) 

Source Link

Document

Removes the specified tokens form the NGram model, they are just dropped.

Usage

From source file:opennlp.tools.ngram.NGramModelTest.java

@Test
public void testRemove() throws Exception {
    NGramModel ngramModel = new NGramModel();
    StringList tokens = new StringList("the", "bro", "wn");
    ngramModel.add(tokens);//from   w  w  w.jav a 2 s .  c  o  m
    ngramModel.remove(tokens);
    Assert.assertEquals(0, ngramModel.size());
}