Skip to content

Commit 5850694

Browse files
committed
fix: improve extraction rules
1 parent 67251a8 commit 5850694

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

β€Žsrc/extraction/rules/basic.tsβ€Ž

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ export class BasicExtrationRule extends ExtractionRule {
1717
// ❌ camel case
1818
if (s.match(/[a-z][A-Z0-9]/))
1919
return ExtractionScore.ShouldExclude
20-
// ❌ all small cases
20+
// ❌ all lower cases
2121
if (s.match(/^[a-z0-9-]+$/))
2222
return ExtractionScore.ShouldExclude
23+
// ❌ all upper cases
24+
if (s.match(/^[A-Z0-9-]+$/))
25+
return ExtractionScore.ShouldExclude
2326
// ❌ all digits
2427
if (s.match(/^[\d.]+$/))
2528
return ExtractionScore.ShouldExclude
2629
// βœ… all words
2730
if (s.match(/^[A-Za-z0-9]+$/))
2831
return ExtractionScore.ShouldInclude
2932
// βœ… one char
30-
if (s.length === 1 && !'/.-\\:+$^#,'.includes(s))
33+
if (s.length === 1 && !'/.-\\:+$^#_"\','.includes(s))
3134
return ExtractionScore.ShouldInclude
3235
}
3336
}

0 commit comments

Comments
Β (0)