Created
August 3, 2018 14:48
-
-
Save epugh/836ff37fbf9f9d94b57d9142ade2388c to your computer and use it in GitHub Desktop.
Friday share messaging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
classifier = ClassifierReborn::LSI.new #:auto_rebuild => false | |
strings = [ | |
["n/a OSC Retreat.", :missing], | |
["LOOKING FOR SPEAKER", :missing], | |
["Need speaker", :missing], | |
["Elizabeth Solr Search", :present], | |
["Matt Datastax", :present], | |
["Scott Roll your own user analytics with Zeppelin", :present], | |
["Brandon Rose Spark and Elasticsearch", :present], | |
["Elizabeth Testing search relevance", :present], | |
["Eric Pugh, Bing Gin (SearchStax) SearchStax Briefing (Resheduled)", :present], | |
["Pere Rene Elizabeth Search engine comparison (30 mins Marklogic; 30 mins SQL Server Search Liz)", :present] | |
] | |
strings.each { |x| classifier.add_item x.first, x.last } | |
assert_same :missing, (classifier.classify ("speakers are needed")) | |
assert_same :missing, (classifier.classify ("speaker needed")) | |
assert_not_same :missing, (classifier.classify ("Matt Overstreet Solr Stemmers")) | |
assert_same :present, (classifier.classify ("Matt Overstreet Solr Stemmers")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment