Code Monkey home page Code Monkey logo

bmdmsoundex's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmdmsoundex's Issues

Lithuanian language

Add Lithuanian language to the library.
Also provide necessary files for BMPM procedural version.

Arabic input causes long processing time

This code causes a very long loop, which might be a major problem for real time systems:

$phonetic = Phonetic::app()->run();
$phonetic->BMSoundex->getPhoneticKeys("الفندقومية");

It took me 383 seconds to finish.

MonoLog Version 2 Issue with setFormatter() on NullHandler

Version 2 NullHandler does not accept setFormatter(), $handler must be instanceof Monolog\Handler\FormattableHandlerInterface

I placed $handler->setFormatter($formatter) in this conditions:

if (Logger::API === 1) { $handler->setFormatter($formatter); } elseif (Logger::API === 2 && $handler instanceof Monolog\Handler\FormattableHandlerInterface) { $handler->setFormatter($formatter); }

Parsing mismatch

Name MICHALINSKY in sephardic.

BMPM:

applying language rules from (rulesany) to michalinsky using languages 50
char codes = [#6d]m [#69]i [#63]c [#68]h [#61]a [#6c]l [#69]i [#6e]n [#73]s [#6b]k [#79]y
applying rule #98 pattern=m lcontext= rcontext= subst=m result=m
applying rule #94 pattern=i lcontext= rcontext= subst=i result=mi
applying rule #33 pattern=ch lcontext= rcontext= subst=(S|tS[32]|dZ[32]) result=(miS[50]|mitS[32]|midZ[32])

BMDM:

Applying language rules from 'rulesany' to 'michalinsky' using language code '50'
Char codes = [#6d]m [#69]i [#63]c [#68]h [#61]a [#6c]l [#69]i [#6e]n [#73]s [#6b]k [#79]y
Applying rule #98 [pattern='m', lcontext='', rcontext='', subst='m', result='m']
Applying rule #94 [pattern='i', lcontext='', rcontext='', subst='i', result='mi']
Applying rule #33 [pattern='ch', lcontext='', rcontext='', subst='(S|tS[64]|dZ[64])', result='miS[50]']

So everything was the same up to applying rule #33 from rulesany. At this step BMPM code generates three values (miS mitS midZ) whereas BMDM generates only one (miS). And at this step, BMPM code has the substitution part of the rule as S|tS[32]|dZ[32] whereas BMDM has it as S|tS[64]|dZ[64. So the attribute is different -- 32 in BMPM and 64 in BMDM And that is the cause of the difference between two results.

sep/rulesany.php:33

array("ch","","","(S|tS[$spanish]|dZ[$spanish])") 

So the attribute should correspond to Spanish, because in languagenames.php we have ("any", "french", "hebrew", "italian", "portuguese", "spanish");

On startup limit language scope to a list of predefined languages

To avoid parsing the excessive amount of rulesets upon recognition state, it would be useful to pass the predefined language name or list before processing.

Original procedural BMPM approach:

$languageCode = $spanish; // where $spanish might be 32
$result = Phonetic_UTF8(
    $name,
    $rules[LanguageIndexFromCode($languageCode, $languages)],
    $approxCommon,
    $approx[LanguageIndexFromCode($languageCode, $languages)],
    $languageCode
);

Php warning on BeiderMorse.php line 321

hi,
running the examples the following warning is returned:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /workspace/vendor/dautkom/bmdm/library/BeiderMorse.php on line 321

This could be an error in the code:

for( $j = 0; $j < count($clist); $j++ ) {

should be:

for( $j = 0; $j < $clist; $j++ ) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.