Git Product home page Git Product logo

wyzsoundex's Introduction

WYZSoundex

通过Soundex算法来算出英文单词的读音近似值索引,算法描述请参见:http://en.wikipedia.org/wiki/Soundex

用法:

NSArray *wordsToSoundex = @[@"Robert", @"Rupert", @"Rubin", @"Ashcraft", @"Ashcroft", @"Tymczak", @"Pfister", @"Knuth", @"Kant"];
for (NSString *word in wordsToSoundex) {
    NSLog(@"%@'s soundex is: %@", word, [WYZSoundex soundexForWord:word]);
}

输出:

2014-04-09 22:54:58.934 WYZSoundex[1720:60b] Robert's soundex is: R163
2014-04-09 22:54:58.935 WYZSoundex[1720:60b] Rupert's soundex is: R163
2014-04-09 22:54:58.936 WYZSoundex[1720:60b] Rubin's soundex is: R150
2014-04-09 22:54:58.936 WYZSoundex[1720:60b] Ashcraft's soundex is: A261
2014-04-09 22:54:58.937 WYZSoundex[1720:60b] Ashcroft's soundex is: A261
2014-04-09 22:54:58.937 WYZSoundex[1720:60b] Tymczak's soundex is: T522
2014-04-09 22:54:58.938 WYZSoundex[1720:60b] Pfister's soundex is: P236
2014-04-09 22:54:58.938 WYZSoundex[1720:60b] Knuth's soundex is: K530
2014-04-09 22:54:58.939 WYZSoundex[1720:60b] Kant's soundex is: K530

wyzsoundex's People

Contributors

azone avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.