PHP 클래스 DaveChild\TextStatistics\Syllables

파일 보기 프로젝트 열기: nystudio107/seomatic 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$arrAddSyllables These syllables would be counted as one but should be two
$arrAffix Single syllable prefixes and suffixes
$arrDoubleAffix Double syllable prefixes and suffixes
$arrProblemWords - Portmanteaus
$arrSubSyllables These syllables would be counted as two but should be one
$arrTripleAffix Triple syllable prefixes and suffixes

공개 메소드들

메소드 설명
averageSyllablesPerWord ( string $strText, string $strEncoding = '' ) : integer | float Returns average syllables per word for text.
percentageWordsWithThreeSyllables ( string $strText, boolean $blnCountProperNouns = true, $strEncoding = '' ) : integer | float Returns the percentage of words with more than three syllables
syllableCount ( string $strWord, string $strEncoding = '' ) : integer Returns the number of syllables in the word.
totalSyllables ( string $strText, string $strEncoding = '' ) : integer Returns total syllable count for text.
wordsWithThreeSyllables ( string $strText, boolean $blnCountProperNouns = true, string $strEncoding = '' ) : integer Returns the number of words with more than three syllables

메소드 상세

averageSyllablesPerWord() 공개 정적인 메소드

Returns average syllables per word for text.
public static averageSyllablesPerWord ( string $strText, string $strEncoding = '' ) : integer | float
$strText string Text to be measured
$strEncoding string Encoding of text
리턴 integer | float

percentageWordsWithThreeSyllables() 공개 정적인 메소드

Returns the percentage of words with more than three syllables
public static percentageWordsWithThreeSyllables ( string $strText, boolean $blnCountProperNouns = true, $strEncoding = '' ) : integer | float
$strText string Text to be measured
$blnCountProperNouns boolean Boolean - should proper nouns be included in words count
리턴 integer | float

syllableCount() 공개 정적인 메소드

Based in part on Greg Fast's Perl module Lingua::EN::Syllables
public static syllableCount ( string $strWord, string $strEncoding = '' ) : integer
$strWord string Word to be measured
$strEncoding string Encoding of text
리턴 integer

totalSyllables() 공개 정적인 메소드

Returns total syllable count for text.
public static totalSyllables ( string $strText, string $strEncoding = '' ) : integer
$strText string Text to be measured
$strEncoding string Encoding of text
리턴 integer

wordsWithThreeSyllables() 공개 정적인 메소드

Returns the number of words with more than three syllables
public static wordsWithThreeSyllables ( string $strText, boolean $blnCountProperNouns = true, string $strEncoding = '' ) : integer
$strText string Text to be measured
$blnCountProperNouns boolean Boolean - should proper nouns be included in words count
$strEncoding string Encoding of text
리턴 integer

프로퍼티 상세

$arrAddSyllables 공개적으로 정적으로 프로퍼티

These syllables would be counted as one but should be two
public static $arrAddSyllables

$arrAffix 공개적으로 정적으로 프로퍼티

Single syllable prefixes and suffixes
public static $arrAffix

$arrDoubleAffix 공개적으로 정적으로 프로퍼티

Double syllable prefixes and suffixes
public static $arrDoubleAffix

$arrProblemWords 공개적으로 정적으로 프로퍼티

- Portmanteaus
public static $arrProblemWords

$arrSubSyllables 공개적으로 정적으로 프로퍼티

These syllables would be counted as two but should be one
public static $arrSubSyllables

$arrTripleAffix 공개적으로 정적으로 프로퍼티

Triple syllable prefixes and suffixes
public static $arrTripleAffix