File tree 3 files changed +1
-13
lines changed
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".
36
36
- Implement modal verb translation e.g. "mi ken" into "I can".
37
37
- Implement pagination. This also prevents browser crashes due to numerous
38
38
translation output.
39
- - Reorder noun by perspective from third person then second then finally first.
40
39
- Number as english words e.g. "ten" instead of "10" are now used for small
41
40
numbers (&leq ; 20). Thanks soweli Eweke for the suggestion!
42
41
- 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";
4
4
import { encodeDeterminer } from "./determiner.ts" ;
5
5
import { FilteredError } from "./error.ts" ;
6
6
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
- }
15
7
function fixNounPhrase ( noun : English . NounPhrase ) : English . NounPhrase {
16
8
switch ( noun . type ) {
17
9
case "simple" :
@@ -34,9 +26,7 @@ function fixNounPhrase(noun: English.NounPhrase): English.NounPhrase {
34
26
case "compound" :
35
27
return {
36
28
...noun ,
37
- nouns : noun . nouns
38
- . map ( fixNounPhrase )
39
- . sort ( ( a , b ) => rankNoun ( a ) - rankNoun ( b ) ) ,
29
+ nouns : noun . nouns . map ( fixNounPhrase ) ,
40
30
} ;
41
31
}
42
32
}
Original file line number Diff line number Diff line change @@ -147,7 +147,6 @@ export function quantity(noun: English.NounPhrase): English.Quantity {
147
147
case "and" :
148
148
return "plural" ;
149
149
case "or" :
150
- // TODO: this doesn't work because nouns are reordered on `fixer.ts`
151
150
return quantity ( noun . nouns [ noun . nouns . length - 1 ] ) ;
152
151
}
153
152
}
You can’t perform that action at this time.
0 commit comments