File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,10 @@ function modifier(modifier: TokiPona.Modifier): Output<ModifierTranslation> {
325
325
return new Output ( [ { type : "name" , name : modifier . words } ] ) ;
326
326
case "pi" :
327
327
return phrase ( modifier . phrase , "object" )
328
+ . filter ( ( modifier ) =>
329
+ modifier . type !== "noun" || modifier . noun . type !== "simple" ||
330
+ modifier . noun . preposition . length === 0
331
+ )
328
332
. filter ( ( modifier ) =>
329
333
modifier . type != "adjective" || modifier . inWayPhrase != null
330
334
) ;
@@ -408,10 +412,7 @@ function multipleModifiers(
408
412
adverb . length === 0 &&
409
413
name . length <= 1 &&
410
414
inPositionPhrase . length <= 1 &&
411
- ( noun . length === 0 || inPositionPhrase . length === 0 ) &&
412
- ( noun . length === 0 ||
413
- ( noun [ 0 ] as English . NounPhrase & { type : "simple" } ) . preposition
414
- . length === 0 )
415
+ ( noun . length === 0 || inPositionPhrase . length === 0 )
415
416
) {
416
417
adjectival = new Output ( [ {
417
418
type : "adjectival" ,
@@ -1295,3 +1296,4 @@ function multipleSentences(
1295
1296
export function translate ( src : string ) : Output < Array < English . Sentence > > {
1296
1297
return parse ( src ) . flatMap ( multipleSentences ) ;
1297
1298
}
1299
+ translate ( "jan pi pona mute" ) ;
You can’t perform that action at this time.
0 commit comments