Overview

Classes

  • Sentence
  • SentenceTest

Functions

  • Sentence_autoloader
  • Overview
  • Class

Class Sentence

Segments sentences. Clipping may not be perfect. Sentence count should be VERY close to the truth.

Multibyte safe (atleast for UTF-8), but rules based on germanic language stucture (English, Dutch, German). Should work for most latin-alphabet languages.

Located at classes/Sentence.php
Methods summary
public array
# split( string $text, integer $flags = 0 )

Return the sentences sentences detected in the provided text. Set the Sentence::SPLIT_TRIM flag to trim whitespace.

Return the sentences sentences detected in the provided text. Set the Sentence::SPLIT_TRIM flag to trim whitespace.

Parameters

$text
$flags

Returns

array
public integer
# count( string $text )

Return the number of sentences detected in the provided text.

Return the number of sentences detected in the provided text.

Parameters

$text

Returns

integer
Constants summary
integer SPLIT_TRIM

Specify this flag with the split method to trim whitespace.

Specify this flag with the split method to trim whitespace.

# 0x1
phpSentence API documentation generated by ApiGen