DocumentNameFinder (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.namefind, interface: DocumentNameFinder

# Interface DocumentNameFinder

public interface DocumentNameFinder
Interface for processing an entire document allowing a `TokenNameFinder` to use context from the entire document.

EXPERIMENTAL: This interface has been added as part of a work in progress and might change without notice.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Span[][]`
  `find(String[][] document)`
  Finds tokens `spans` for the specified document of sentences and their tokens.

- ## Method Details

  - ### find

    Span[][] find(String[][] document)
    Finds tokens `spans` for the specified document of sentences and their tokens.

    Span start and end indices are relative to the sentence they are in. For example, a span identifying a name consisting of the first and second word of the second sentence would be `0..2` and be referenced as `spans[1][0]`.

    Parameters:
      `document` - A 2-dimensional array of tokens for each sentence of a document.
    Returns:
      The `token spans` for each sentence of the specified document.