NlpTools API
Class

NlpTools\Utils\EnglishVowels

class EnglishVowels extends VowelsAbstractFactory

Helper Vowel class, determines if the character at a given index is a vowel

Methods

static VowelAbstractFactory factory(string $language = 'English')

Return the correct language vowel checker

from VowelsAbstractFactory
boolean isVowel(string $word, int $index)

Returns true if the letter at the given index is a vowel, works with y

Details

in VowelsAbstractFactory at line 21
static public VowelAbstractFactory factory(string $language = 'English')

Return the correct language vowel checker

Parameters

string $language

Return Value

VowelAbstractFactory

Exceptions

Exception

at line 16
public boolean isVowel(string $word, int $index)

Returns true if the letter at the given index is a vowel, works with y

Parameters

string $word the word to use
int $index the index in the string to inspect

Return Value

boolean True letter at the provided index is a vowel