Guest User

Untitled

a guest
Apr 26th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class Config
  2. # ... il y a du code avant
  3. # Find the appropriate signature for the given file
  4. def find(_text)
  5. processed = Signature.splitSentence(_text)
  6. values = {}
  7. @signatures.each do |sig|
  8. values\[sig.compute(processed)\]=sig
  9. end
  10. sortedValues = values.sort {|a,b| -1*(a\[0\]< =>b\[0\])}
  11. return sortedValues\[0\]\[1\].signatureText
  12. end
Add Comment
Please, Sign In to add comment