We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have the following text with the corresponding language as detected by this package (all English) Only the bold text is correct.
besides using composer install ... I have done anything
composer install ...
The text here is just an example, it's from github blog (title of the last 10 posts)
if I do new \LanguageDetector\LanguageDetector(null,['en']); it will work, but that is not the goal.
new \LanguageDetector\LanguageDetector(null,['en']);
the code looks like this:
$languageDetector = new \LanguageDetector\LanguageDetector(); foreach($titles AS $title) { $languages = $languageDetector->evaluate($title)->getLanguage(); echo $title.' - '.(string)$languages.PHP_EOL; }
The text was updated successfully, but these errors were encountered:
Looks like this suffers from the same thing as the more popular https://github.com/patrickschur/language-detection
It does a good job with long texts but is borderless useless for short sentences.. getting it wrong at an alarmingly high rate
Still looking for a reliable language detector that works well with short sentences in case anyone finds one please share
Sorry, something went wrong.
ward
@vesper8 https://github.com/fntlnz/cld2-php-ext works good for my use-cases also with rather short texts. It detects all the above cases as English
No branches or pull requests
I have the following text with the corresponding language as detected by this package (all English)
Only the bold text is correct.
besides using
composer install ...
I have done anythingThe text here is just an example, it's from github blog (title of the last 10 posts)
if I do
new \LanguageDetector\LanguageDetector(null,['en']);
it will work, but that is not the goal.the code looks like this:
The text was updated successfully, but these errors were encountered: