Updated Text_LangCorrect class (#309)

* Updated Text_LangCorrect class

Used this fork https://github.com/b1rdex/text-lang-correct

Co-Authored-By: Anatoly Pashin <anatoly.pashin+github@gmail.com>

* Update correct.php

Co-Authored-By: Anatoly Pashin <anatoly.pashin+github@gmail.com>

* Update CHANGELOG.md

---------

Co-authored-by: Anatoly Pashin <anatoly.pashin+github@gmail.com>
This commit is contained in:
Roman Kelesidis 2023-10-06 20:32:11 +07:00 committed by GitHub
parent 71eaa8e76f
commit 01222c44ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -6,6 +6,7 @@
**Merged pull requests:** **Merged pull requests:**
- Release v2.1.5-2023.10 🎉 - Release v2.1.5-2023.10 🎉
- Updated Text_LangCorrect class [\#309](https://github.com/torrentpier/torrentpier-lts/pull/309) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#297](https://github.com/torrentpier/torrentpier-lts/pull/297), [\#298](https://github.com/torrentpier/torrentpier-lts/pull/298), [\#300](https://github.com/torrentpier/torrentpier-lts/pull/300), [\#301](https://github.com/torrentpier/torrentpier-lts/pull/301), [\#302](https://github.com/torrentpier/torrentpier-lts/pull/302), [\#303](https://github.com/torrentpier/torrentpier-lts/pull/303), [\#305](https://github.com/torrentpier/torrentpier-lts/pull/305), [\#306](https://github.com/torrentpier/torrentpier-lts/pull/306), [\#307](https://github.com/torrentpier/torrentpier-lts/pull/307) ([belomaxorka](https://github.com/belomaxorka)) - Minor improvements [\#297](https://github.com/torrentpier/torrentpier-lts/pull/297), [\#298](https://github.com/torrentpier/torrentpier-lts/pull/298), [\#300](https://github.com/torrentpier/torrentpier-lts/pull/300), [\#301](https://github.com/torrentpier/torrentpier-lts/pull/301), [\#302](https://github.com/torrentpier/torrentpier-lts/pull/302), [\#303](https://github.com/torrentpier/torrentpier-lts/pull/303), [\#305](https://github.com/torrentpier/torrentpier-lts/pull/305), [\#306](https://github.com/torrentpier/torrentpier-lts/pull/306), [\#307](https://github.com/torrentpier/torrentpier-lts/pull/307) ([belomaxorka](https://github.com/belomaxorka))
## [v2.1.5-2023.09](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.09) (2023-10-04) ## [v2.1.5-2023.09](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.09) (2023-10-04)

View File

@ -47,6 +47,8 @@ if (!defined('BB_ROOT')) die(basename(__FILE__));
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/ * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
* @author Nasibullin Rinat * @author Nasibullin Rinat
* @version 1.4.3 * @version 1.4.3
*
* Fork: https://github.com/b1rdex/text-lang-correct | Aug 4 2023 | 0.1.8
*/ */
class Text_LangCorrect class Text_LangCorrect
@ -2654,12 +2656,15 @@ class Text_LangCorrect
'qz ' => 0, 'qz ' => 0,
'rq ' => 0, 'rq ' => 0,
'rz ' => 0, 'rz ' => 0,
'rf ' => 0,
'rb ' => 0,
'sg ' => 0, 'sg ' => 0,
'sj ' => 0, 'sj ' => 0,
'sx' => 0, 'sx' => 0,
'sx ' => 0, 'sx ' => 0,
'sz' => 0, 'sz' => 0,
'sz ' => 0, 'sz ' => 0,
'tc ' => 0,
'tg ' => 0, 'tg ' => 0,
'tj ' => 0, 'tj ' => 0,
'tq' => 0, 'tq' => 0,
@ -2906,6 +2911,12 @@ class Text_LangCorrect
$word = $a[0]; $word = $a[0];
#var_export($a); #var_export($a);
// todo: add skip list
if ($word === 'блэкаут')
{
return $word;
}
$suggestions = array(); $suggestions = array();
#если найдено слово из мешанины русских и латинских букв #если найдено слово из мешанины русских и латинских букв
@ -3105,4 +3116,4 @@ class Text_LangCorrect
return false; return false;
} }
} }