rustling-ontology icon indicating copy to clipboard operation
rustling-ontology copied to clipboard

[Chinese] Grammar Issues

Open hdlj opened this issue 8 years ago • 0 comments

    b.rule_1_terminal("named-day",
                      b.reg(r#"星期日|星期天|礼拜天|周日|禮拜天|週日|禮拜日"#)?,
                      |_| helpers::day_of_week(Weekday::Sun)
    );

周天 is missing

    b.rule_1_terminal("hundred",
                      b.reg(r#"百|仟"#)?,
                      |_| IntegerValue::new_with_grain(100, 2)
    );

    b.rule_1_terminal("thousand",
                      b.reg(r#"千|佰"#)?,
                      |_| IntegerValue::new_with_grain(1000, 3)
    );

百|佰 hundred 千|仟 thousand

Seasons not supported:

春(天|季)? : spring 夏(天|季)?: summer 秋(天|季)?: fall 冬(天|季)?: winter

    b.rule_1_terminal("afternoon",
                      b.reg(r#"下午|中午|晏晝"#)?,
                      |_| {
                          Ok(helpers::hour(12, false)?
                              .span_to(&helpers::hour(19, false)?, false)?
                              .latent()
                              .form(Form::PartOfDay))
                      }
    );

only 下午 is right

    b.rule_1_terminal("morning",
                      b.reg(r#"早上|早晨|朝頭?早"#)?,
                      |_| {
                          Ok(helpers::hour(4, false)?
                              .span_to(&helpers::hour(12, false)?, false)?
                              .latent()
                              .form(Form::PartOfDay))
                      }
    );

early morning: 早上 朝頭?早 has no sense at first sight

hdlj avatar Sep 08 '17 14:09 hdlj