소스 검색

[Fix] Add missing score normalisation for HFILTER_URL_ONLY

 - Issue: #1565
 - Reported by: @moisseev
tags/1.5.5
Andrew Lewis 7 년 전
부모
커밋
ab14fef3b0
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3
    2
      src/plugins/lua/hfilter.lua

+ 3
- 2
src/plugins/lua/hfilter.lua 파일 보기

@@ -292,8 +292,9 @@ local function hfilter(task)
if plen > 0 and url_len > 0 then
local rel = url_len / plen
if rel > 0.8 then
task:insert_result('HFILTER_URL_ONLY', (rel - 0.8) * 5.0,
tostring(rel))
local sc = (rel - 0.8) * 5.0
if sc > 1.0 then sc = 1.0 end
task:insert_result('HFILTER_URL_ONLY', sc, tostring(sc))
local lines = plain_text_part:get_lines_count()
if lines > 0 and lines < 2 then
task:insert_result('HFILTER_URL_ONELINE', 1.00,

Loading…
취소
저장