class TokensDocument implements DocumentInterface
Represents a bag of words (tokens) document.
Methods
__construct(array $tokens) | ||
array |
getDocumentData()
Return the data of what is being represented. |
|
applyTransformation(TransformationInterface $transform)
Apply the transformation to the data of this document. |
Details
at line 13
public
__construct(array $tokens)
at line 21
public array
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)).
at line 31
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.