Created
December 30, 2009 13:25
-
-
Save Riduidel/266039 to your computer and use it in GitHub Desktop.
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
class Config | |
# ... il y a du code avant | |
# Find the appropriate signature for the given file | |
def find(_text) | |
processed = Signature.splitSentence(_text) | |
values = {} | |
@signatures.each do |sig| | |
values\[sig.compute(processed)\]=sig | |
end | |
sortedValues = values.sort {|a,b| -1*(a\[0\]< =>b\[0\])} | |
return sortedValues\[0\]\[1\].signatureText | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment