File tree Expand file tree Collapse file tree 3 files changed +1
-13
lines changed Expand file tree Collapse file tree 3 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ do not communicate" instead of the grammatically awkward "I not communicate".
3636- Implement modal verb translation e.g. "mi ken" into "I can".
3737- Implement pagination. This also prevents browser crashes due to numerous
3838 translation output.
39- - Reorder noun by perspective from third person then second then finally first.
4039- Number as english words e.g. "ten" instead of "10" are now used for small
4140 numbers (&leq ; 20). Thanks soweli Eweke for the suggestion!
4241- Remove "allow separate repeated modifiers". It'll be hardcoded to be turned
Original file line number Diff line number Diff line change @@ -4,14 +4,6 @@ import * as English from "./ast.ts";
44import { encodeDeterminer } from "./determiner.ts" ;
55import { FilteredError } from "./error.ts" ;
66
7- function rankNoun ( noun : English . NounPhrase ) : number {
8- switch ( noun . type ) {
9- case "simple" :
10- return [ "third" , "second" , "first" ] . indexOf ( noun . perspective ) ;
11- case "compound" :
12- return rankNoun ( noun . nouns [ 0 ] ) ;
13- }
14- }
157function fixNounPhrase ( noun : English . NounPhrase ) : English . NounPhrase {
168 switch ( noun . type ) {
179 case "simple" :
@@ -34,9 +26,7 @@ function fixNounPhrase(noun: English.NounPhrase): English.NounPhrase {
3426 case "compound" :
3527 return {
3628 ...noun ,
37- nouns : noun . nouns
38- . map ( fixNounPhrase )
39- . sort ( ( a , b ) => rankNoun ( a ) - rankNoun ( b ) ) ,
29+ nouns : noun . nouns . map ( fixNounPhrase ) ,
4030 } ;
4131 }
4232}
Original file line number Diff line number Diff line change @@ -147,7 +147,6 @@ export function quantity(noun: English.NounPhrase): English.Quantity {
147147 case "and" :
148148 return "plural" ;
149149 case "or" :
150- // TODO: this doesn't work because nouns are reordered on `fixer.ts`
151150 return quantity ( noun . nouns [ noun . nouns . length - 1 ] ) ;
152151 }
153152 }
You can’t perform that action at this time.
0 commit comments