Download Jar. Libraryless. Click here for Pure Java version (11069L/81K).
1 | !7 |
2 | |
3 | p-exp { |
4 | S s = "I did the rgjiogjidres today"; |
5 | PTElement tree = ai_parseToTreeWithGuessing(s); |
6 | L<S> unknown = ai_unknownWordsInSentence(s); |
7 | printStruct(+unknown); |
8 | assertTrue(nempty(unknown)); |
9 | |
10 | //ai_cullParseTree(tree); |
11 | |
12 | for (S word : unknown) { |
13 | //L<PTElement> e = ai_scanParseTreeForWord_all(tree, word); |
14 | L<PTElement> e = ai_scanParseTreeForWord_all_tighter(tree, word); |
15 | //e = map ai_parseTree_descendToComposite_opt(e); |
16 | //pnl(map toStringWithClass(e)); |
17 | L<S> categories = uniquify(notNulls(mapMethod(e, 'category))); |
18 | print("Guessing categories for " + word + ": " + categories); |
19 | } |
20 | } |
Began life as a copy of #1017485
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: | #1017489 |
Snippet name: | Print most likely types of unknown word by best parse [OK] |
Eternal ID of this version: | #1017489/13 |
Text MD5: | 9cbf55c80e452dd8174390a725922485 |
Transpilation MD5: | 6b1cdf6c1402509e3fa97a5c54a2857b |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-23 23:06:58 |
Source code size: | 648 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 522 / 1193 |
Version history: | 12 change(s) |
Referenced in: | [show references] |