Popularity
4.6
Declining
Activity
0.0
Stable
19
1
2
Programming language: Crystal
License: MIT License
Tags:
Algorithms And Data Structures
Latest version: v0.1.0
text alternatives and similar shards
Based on the "Algorithms and Data structures" category.
Alternatively, view text alternatives based on common mentions on social networks and blogs.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of text or a related project?
Popular Comparisons
README
Text
A collection of text algorithms. Including; Porter-Stemmer, Soundex, Metaphone, Double Metaphone & White Similarity
Installation
Add this to your application's shard.yml
:
dependencies:
text:
github: johnjansen/text
Usage
require "text"
Levenshtein distance
You should use the Levenshtein module in the Crystal StdLib though ...
Text::Levenshtein.distance('test', 'test')
# => 0
Text::Levenshtein.distance('test', 'tent')
# => 1
Text::Levenshtein.distance('test', 'testing')
# => 3
Text::Levenshtein.distance('test', 'testing', 2)
# => 2
Metaphone
Text::Metaphone.metaphone('BRIAN')
# => 'BRN'
Text::Metaphone.double_metaphone('Coburn')
# => ['KPRN', nil]
Text::Metaphone.double_metaphone('Angier')
# => ['ANJ', 'ANJR']
Soundex
Text::Soundex.soundex('Knuth')
# => 'K530'
Porter stemming
Text::PorterStemming.stem('abatements') # => 'abat'
White similarity
white = Text::WhiteSimilarity.new
white.similarity('Healed', 'Sealed') # 0.8
white.similarity('Healed', 'Help') # 0.25
Contributing
- Fork it ( https://github.com/johnjansen/text/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- johnjansen John Jansen - creator, maintainer
Thanks
- Paul Battley (threedaymonk)
- Michael Neumann
- Tim Fletcher
- Hampton Catlin (hcatlin)
- Wilker Lúcio
- everyone who contributed to https://github.com/threedaymonk/text