mirror of
https://github.com/house-of-vanity/desubot.git
synced 2025-07-06 20:24:08 +00:00
Improve omedeto. Detect feminine by verbs. Fix
This commit is contained in:
@ -237,24 +237,30 @@ pub(crate) async fn omedeto(api: Api, message: Message, mystem: &mut MyStem) ->
|
||||
} else {
|
||||
match stem[0].lex[0].grammem.part_of_speech {
|
||||
mystem::PartOfSpeech::Verb => {
|
||||
if stem[0].lex[0]
|
||||
.grammem
|
||||
.facts
|
||||
.contains(&mystem::Fact::Gender(Feminine)) &&
|
||||
stem[0].lex[0]
|
||||
match stem[0].lex[0]
|
||||
.grammem
|
||||
.facts
|
||||
.contains(&mystem::Fact::Tense(Past))
|
||||
{
|
||||
fm = fm + 1;
|
||||
} else {
|
||||
mu = mu + 1;
|
||||
{
|
||||
true => {
|
||||
if stem[0].lex[0]
|
||||
.grammem
|
||||
.facts
|
||||
.contains(&mystem::Fact::Gender(Feminine))
|
||||
{
|
||||
fm = fm + 1;
|
||||
} else {
|
||||
mu = mu + 1;
|
||||
}
|
||||
}
|
||||
false => (),
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}).collect::<()>();
|
||||
})
|
||||
.collect::<()>();
|
||||
debug!("fm - {}, mu - {}", fm, mu);
|
||||
if fm >= mu {
|
||||
true
|
||||
|
Reference in New Issue
Block a user