Remove the attempts to make the language filter more lenient (#569)
parent
204c6729e7
commit
906b906eb1
|
@ -214,20 +214,10 @@ export class FeedTuner {
|
||||||
) {
|
) {
|
||||||
const res = lande(item.post.record.text)
|
const res = lande(item.post.record.text)
|
||||||
|
|
||||||
// require at least 70% confidence; otherwise, roll with it
|
if (langsCode3.includes(res[0][0])) {
|
||||||
if (res[0][1] <= 0.7) {
|
|
||||||
hasPreferredLang = true
|
hasPreferredLang = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the user's languages are in the top 5 guesses, roll with it
|
|
||||||
for (let j = 0; j < 5 && j < res.length; j++) {
|
|
||||||
hasPreferredLang =
|
|
||||||
hasPreferredLang || langsCode3.includes(res[i][0])
|
|
||||||
}
|
|
||||||
if (hasPreferredLang) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// no text? roll with it
|
// no text? roll with it
|
||||||
hasPreferredLang = true
|
hasPreferredLang = true
|
||||||
|
|
Loading…
Reference in New Issue