Libraryless. Click here for Pure Java version (9235L/67K/217K).
sS ai_simplifyNP_2(S s) { loop: for (S pat, pat2 : mechMap("Noun simplification patterns")) { SS map = matchDollarVarsIC_plusBrackets(pat, s); if (map == null) continue; for (S var, val : map) { if (startsWith(var, "$noun") && !isNoun(val)) continue loop; } ret replaceVars(pat2, map); } ret s; }
Began life as a copy of #1011195
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021340 |
Snippet name: | ai_simplifyNP_2 - simplify noun phrase |
Eternal ID of this version: | #1021340/2 |
Text MD5: | dd8693bbb260c05f59a13677817e2e37 |
Transpilation MD5: | 2da053e8268358954a40aed51ae19470 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-08 20:28:17 |
Source code size: | 338 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 278 / 359 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |