NlpTools API
Interface

NlpTools\Documents\DocumentInterface

interface DocumentInterface

A Document is a representation of a Document to be classified.

It can be a representation of a word, of a bunch of text, of a text
that has structure (ex.: Title,Body,Link)

Methods

mixed getDocumentData()

Return the data of what is being represented.

applyTransformation(TransformationInterface $transform)

Apply the transformation to the data of this document.

Details

at line 21
public mixed getDocumentData()

Return the data of what is being represented.

If it were a word
we could return a word. If it were a blog post we could return
an array(Title,Body,array(Comments)).

Return Value

mixed

at line 30
public applyTransformation(TransformationInterface $transform)

Apply the transformation to the data of this document.

How the transformation is applied (per token, per token sequence, etc)
is decided by the implementing classes.

Parameters

TransformationInterface $transform The transformation to be applied