1 | static Map<S, Double> ai_guessCategoriesForUnknownWord_weighted(S word) {
|
2 | Map<S, Double> map = lithashmap("<noun>" := 0.3, "<verb>" := 0.3, "<adjective>" := 0.2);
|
3 | if (ewic(word, "ing")) map.put("<ingform>" := 0.6);
|
4 | if (ewic(word, "ly")) map.put("<adverb>" := 0.6);
|
5 | if (eqic(word, "ed")) map.put("<past_participle>" := 0.5);
|
6 | ret map; |
7 | } |
Began life as a copy of #1017454
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1017459 |
| Snippet name: | ai_guessCategoriesForUnknownWord_weighted |
| Eternal ID of this version: | #1017459/3 |
| Text MD5: | 9ef07a97e528e5234e9a1e00b5be0bc7 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-07-26 10:32:47 |
| Source code size: | 350 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 555 / 601 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |