peter-gribanov / analyzertext Goto Github PK
View Code? Open in Web Editor NEWAnalyzer text
License: MIT License
Analyzer text
License: MIT License
The expression
$this->percent
of typearray
is implicitly converted to a boolean; are you sure this is intended? If so, consider usingempty($expr)
instead to make it clear that you intend to check for an array without elements.
Пример
$analyzer = new Frequency();
$analyzer->setText(new Text('Петрович ударил со всей силы кулаком по столу'));
$analyzer->applyFilters()->Informative();
Undefined offset: 4
/mnt/c/www/AnalyzerText/AnalyzerText/Text.php:60
/mnt/c/www/AnalyzerText/AnalyzerText/Filter/Factory.php:97
/mnt/c/www/AnalyzerText/AnalyzerText/Filter/Factory.php:43
/mnt/c/www/AnalyzerText/tests/Filter/FactoryTest.php:89
It seems like you are calling the size function
count()
as part of the test condition. You might want to compute the size beforehand, and not on each iteration.
Пример
$analyzer = new Frequency();
$analyzer->setText(new Text('со всей силы'));
$analyzer->applyFilters()->Informative();
OutOfBoundsException: Seek position 2 is out of range
/mnt/c/www/AnalyzerText/AnalyzerText/Filter/WordList/WordList.php:89
/mnt/c/www/AnalyzerText/AnalyzerText/Filter/Informative.php:59
/mnt/c/www/AnalyzerText/AnalyzerText/Filter/Factory.php:97
/mnt/c/www/AnalyzerText/AnalyzerText/Filter/Factory.php:43
/mnt/c/www/AnalyzerText/tests/Filter/FactoryTest.php:89
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.