Method
getFrequency
(Hashtable<String, Integer> table, String word)
Source from the content-addressed store, hash-verified
| 19 | return table; |
| 20 | } |
| 21 | public static int getFrequency(Hashtable<String, Integer> table, String word) { |
| 22 | if (table == null || word == null) { |
| 23 | return -1; |
| 24 | } |
| 25 | word = word.toLowerCase(); |
| 26 | if (table.containsKey(word)) { |
| 27 | return table.get(word); |
| 28 | } |
| 29 | return 0; |
| 30 | } |
| 31 | |
| 32 | public static void main(String[] args) { |
| 33 | String[] wordlist = AssortedMethods.getLongTextBlobAsStringList(); |
Tested by
no test coverage detected