1

edict: fix Score

This commit is contained in:
siikamiika 2017-10-12 02:58:40 +03:00
parent edb162808e
commit c6c50ce5c5

View File

@ -49,11 +49,17 @@ func jmdictBuildRules(term *dbTerm) {
func jmdictBuildScore(term *dbTerm) {
for _, tag := range term.Tags {
switch tag {
case "news", "ichi", "spec", "gai":
case "arch":
term.Score -= 100
}
}
for _, tag := range term.TermTags {
switch tag {
case "news", "ichi", "spec", "gai1":
term.Score += 100
case "P":
term.Score += 500
case "arch", "iK":
case "iK", "ik":
term.Score -= 100
}
}