NlpTools API
Class

NlpTools\Documents\RawDocument

class RawDocument implements DocumentInterface

RawDocument simply encapsulates a php variable

Methods

__construct($data)

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 14
public __construct($data)

Parameters

$data

at line 19
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 24
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