Word
[ class tree: Word ] [ index: Word ] [ all elements ]

Class: Mai_Word_Splitter

Source Location: /Mai/Word/Splitter.php

Class Overview


Mai_Word_Splitter splits a string in to smaller pieces.


Author(s):

  • Wouter Bulten (wouterbulten@mai-ai.org)

Copyright:

  • Copyright (C) 2009 Mai (Me Artificial Intelligence)

Implements interfaces:

  • IteratorAggregate (internal interface)

Variables

Methods



Class Details

[line 44]
Mai_Word_Splitter splits a string in to smaller pieces.



Tags:

author:  Wouter Bulten (wouterbulten@mai-ai.org)
copyright:  Copyright (C) 2009 Mai (Me Artificial Intelligence)
link:  http://www.launchpad.net/mai
license:  GNU General Public License version 3 (GPLv3)


[ Top ]


Class Variables

$_containerArray = array()

[line 61]



Tags:

var:  An array with container classes. Used when saving to classes.
access:  protected

Type:   array


[ Top ]

$_newSentenceMarks = array('!', '.', ',', '?')

[line 79]

Punctuation marks that mark a new sentence.



Tags:

access:  protected

Type:   array


[ Top ]

$_sentenceMarks = array()

[line 67]

Contains the punctuation marks, sorted by sentence



Tags:

access:  protected

Type:   array


[ Top ]

$_sentences =  0

[line 73]

Contains the number of sentences.



Tags:

access:  protected

Type:   integer


[ Top ]

$_type =  Mai::STORAGE_TYPE_ARRAY

[line 85]

Type of storage (whether to use classes or not)



Tags:

access:  protected

Type:   int


[ Top ]

$_wordArray = array()

[line 56]

Contains an array with words, sorted by sentence.



Tags:

access:  protected

Type:   array


[ Top ]

$_wordsString =

[line 50]

The string to split.



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 90]

Mai_Word_Splitter __construct( [ $type = Mai::STORAGE_TYPE_ARRAY])

Constructor checks if Mai has been set up.



Tags:

access:  public


Parameters:

   $type  

[ Top ]

method getIterator [line 236]

ArrayIterator getIterator( )

Function to implement the IteratorAggregate interface.



Tags:

access:  public



Implementation of:
IteratorAggregate::getIterator
[ Top ]

method returnContainerArray [line 209]

array returnContainerArray( )

Return the container array. Is empty if called before run().



Tags:

access:  public


[ Top ]

method returnSentenceMarks [line 218]

array returnSentenceMarks( )

Return the sentence marks array. Is empty if called before run().



Tags:

access:  public


[ Top ]

method returnSentencesAmount [line 227]

integer returnSentencesAmount( )

Return the amount of sentences.



Tags:

access:  public


[ Top ]

method returnWordArray [line 200]

array returnWordArray( )

Return the word array. Is empty if called before run().



Tags:

access:  public


[ Top ]

method run [line 119]

void run( Int $type)

Runs the splitting process.



Tags:

access:  public


Parameters:

Int   $type   Type of storage

[ Top ]

method setString [line 104]

void setString( $string)



Tags:

access:  public


Parameters:

   $string  

[ Top ]


Documentation generated on Mon, 27 Jul 2009 19:55:13 +0200 by phpDocumentor 1.4.1