Example usage for opennlp.tools.util Span startsWith

List of usage examples for opennlp.tools.util Span startsWith

Introduction

In this page you can find the example usage for opennlp.tools.util Span startsWith.

Prototype

public boolean startsWith(Span s) 

Source Link

Document

Returns true if the specified span is the begin of this span and the specified span is contained in this span.

Usage

From source file:opennlp.tools.util.Span.java

/**
     * Test for {@link Span#startsWith(Span)}.
     *//*from w  ww. jav a 2 s  .  c o m*/
    public void testStartsWith() {
        Span a = new Span(10, 50);
        Span b = new Span(10, 12);

        Assert.assertTrue(a.startsWith(a));

        Assert.assertTrue(a.startsWith(b));

        Assert.assertFalse(b.startsWith(a));

    }