List of usage examples for opennlp.tools.util Span intersects
public boolean intersects(Span s)
From source file:opennlp.tools.util.Span.java
/** * Test for {@link Span#intersects(Span)}. *///w w w . jav a 2s . com public void testIntersects() { Span a = new Span(10, 50); Span b = new Span(40, 100); Assert.assertTrue(a.intersects(b)); Assert.assertTrue(b.intersects(a)); Span c = new Span(10, 20); Span d = new Span(40, 50); Assert.assertFalse(c.intersects(d)); Assert.assertFalse(d.intersects(c)); Assert.assertTrue(b.intersects(d)); }