Libraryless. Click here for Pure Java version (11376L/67K).
1 | static L<ParsedWithTokens<DeterminerPlusNoun>> ai_findSimplestNounPhrases(S s) {
|
2 | replace P with ParsedWithTokens. |
3 | new L<P<DeterminerPlusNoun>> out; |
4 | for (P<S> det : pwt_filter isDeterminer(pwt_initial(s, 2))) |
5 | for (P<S> noun : pwt_stepRight_filter isNoun(1, det)) |
6 | out.add(pwt_combine(DeterminerPlusNoun(det!, noun!), det, noun)); |
7 | ret out; |
8 | } |
Began life as a copy of #1028878
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1028885 |
| Snippet name: | ai_findSimplestNounPhrases |
| Eternal ID of this version: | #1028885/2 |
| Text MD5: | a4d68199b55f21b4ddfef7c848700d02 |
| Transpilation MD5: | 73a92a21f10a9ea8e2f7ee11aaf7e9dd |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-10 19:31:16 |
| Source code size: | 363 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 400 / 532 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |