Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dict): Avoid correcting common terms #975

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/typos-dict/assets/allowed.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@ eof,end-of-file in programming
eol,end-of-line in programming
og,OpenGraph which is used for previews of websites on social media
jst,abbreviation of Japan Standard Time in tz database
guid,globally-unique-identifier in programming
ime,abbreviation of Input Method Editor
epage marked this conversation as resolved.
Show resolved Hide resolved
ws,common abbreviation for websocket and workspace
iot,acronym for Internet of Things
iis,IIS is the webserver from Microsoft
ro,acronym for read-only
dur,abbreviation for duration
ang,abbreviation for angle
lst,abbreviation for list especially when list is a built-in like Python
9 changes: 0 additions & 9 deletions crates/typos-dict/assets/words.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3110,7 +3110,6 @@ anesthisia,anesthesia
anevironment,environment
anevironments,environments
anfd,and
ang,and
angirly,angrily
angluar,angular
angostic,agnostic
Expand Down Expand Up @@ -21029,7 +21028,6 @@ dupplicates,duplicates
dupplicating,duplicating
dupplication,duplication
dupplications,duplications
dur,due
durabiliy,durability
durabillity,durability
durabiltiy,durability
Expand Down Expand Up @@ -28272,7 +28270,6 @@ guerrilas,guerrillas
guerrillera,guerrilla
guesss,guess,guesses
gueswork,guesswork
guid,guide
guideance,guidance
guideded,guided
guidence,guidance
Expand Down Expand Up @@ -29764,7 +29761,6 @@ iimmune,immune
iin,in
iinclude,include
iinterval,interval
iis,is
iit,it
iiterator,iterator
iland,island
Expand Down Expand Up @@ -29917,7 +29913,6 @@ imcompatible,incompatible
imcompetence,incompetence
imcomplete,incomplete
imcomprehensible,incomprehensible
ime,time
imedatly,immediately
imedialy,immediately
imediate,immediate
Expand Down Expand Up @@ -33801,7 +33796,6 @@ ioclt,ioctl
iomaped,iomapped
ionde,inode
iornman,ironman
iot,it
iound,round,wound
iplementation,implementation
ipmrovement,improvement
Expand Down Expand Up @@ -35790,7 +35784,6 @@ lsit,list,slit,sit
lsiting,listing
lsits,lists,slits,sits
lso,also
lst,last
luanched,launched
luancher,launcher
luanchers,launchers
Expand Down Expand Up @@ -51727,7 +51720,6 @@ rmove,remove
rmoved,removed
rmoving,removing
rnage,rage,range
ro,to
roachers,roaches
roahces,roaches
roataion,rotation
Expand Down Expand Up @@ -64938,7 +64930,6 @@ wryth,writhe
wrythed,writhed
wrythes,writhes
wrything,writhing
ws,was
wsee,see
wser,user
wth,with
Expand Down
22 changes: 7 additions & 15 deletions crates/typos-dict/src/word_codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ pub static WORD_WT_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictg

static WORD_WS_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode {
children: dictgen::DictTrieChild::Flat(&WORD_WS_CHILDREN),
value: Some(&["was"]),
value: None,
};

pub static WORD_WS_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictgen::DictTable {
Expand Down Expand Up @@ -45177,7 +45177,7 @@ pub static WORD_RP_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictg

static WORD_RO_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode {
children: dictgen::DictTrieChild::Nested(&WORD_RO_CHILDREN),
value: Some(&["to"]),
value: None,
};

static WORD_RO_CHILDREN: [Option<&dictgen::DictTrieNode<&'static [&'static str]>>; 26] = [
Expand Down Expand Up @@ -99731,7 +99731,6 @@ pub static WORD_LS_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictg
dictgen::InsensitiveStr::Ascii("iting"),
dictgen::InsensitiveStr::Ascii("its"),
dictgen::InsensitiveStr::Ascii("o"),
dictgen::InsensitiveStr::Ascii("t"),
],
values: &[
&["last", "slat", "sat"],
Expand All @@ -99740,7 +99739,6 @@ pub static WORD_LS_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictg
&["listing"],
&["lists", "slits", "sits"],
&["also"],
&["last"],
],
range: 1..=5,
};
Expand Down Expand Up @@ -106372,18 +106370,16 @@ pub static WORD_IO_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictg
dictgen::InsensitiveStr::Ascii("maped"),
dictgen::InsensitiveStr::Ascii("nde"),
dictgen::InsensitiveStr::Ascii("rnman"),
dictgen::InsensitiveStr::Ascii("t"),
dictgen::InsensitiveStr::Ascii("und"),
],
values: &[
&["ioctl"],
&["iomapped"],
&["inode"],
&["ironman"],
&["it"],
&["round", "wound"],
],
range: 1..=5,
range: 3..=5,
};

static WORD_IN_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode {
Expand Down Expand Up @@ -118972,7 +118968,7 @@ pub static WORD_IMF_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict

static WORD_IME_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode {
children: dictgen::DictTrieChild::Flat(&WORD_IME_CHILDREN),
value: Some(&["time"]),
value: None,
};

pub static WORD_IME_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictgen::DictTable {
Expand Down Expand Up @@ -119550,7 +119546,6 @@ pub static WORD_II_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictg
dictgen::InsensitiveStr::Ascii("n"),
dictgen::InsensitiveStr::Ascii("nclude"),
dictgen::InsensitiveStr::Ascii("nterval"),
dictgen::InsensitiveStr::Ascii("s"),
dictgen::InsensitiveStr::Ascii("t"),
dictgen::InsensitiveStr::Ascii("terator"),
],
Expand All @@ -119560,7 +119555,6 @@ pub static WORD_II_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictg
&["in"],
&["include"],
&["interval"],
&["is"],
&["it"],
&["iterator"],
],
Expand Down Expand Up @@ -125000,7 +124994,6 @@ static WORD_GUI_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::

pub static WORD_GUI_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictgen::DictTable {
keys: &[
dictgen::InsensitiveStr::Ascii("d"),
dictgen::InsensitiveStr::Ascii("deance"),
dictgen::InsensitiveStr::Ascii("deded"),
dictgen::InsensitiveStr::Ascii("dence"),
Expand All @@ -125015,7 +125008,6 @@ pub static WORD_GUI_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict
dictgen::InsensitiveStr::Ascii("tarit"),
],
values: &[
&["guide"],
&["guidance"],
&["guided"],
&["guidance"],
Expand All @@ -125029,7 +125021,7 @@ pub static WORD_GUI_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict
&["guitars"],
&["guitarist"],
],
range: 1..=6,
range: 3..=6,
};

static WORD_GUE_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode {
Expand Down Expand Up @@ -148711,7 +148703,7 @@ pub static WORD_DUS_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict

static WORD_DUR_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode {
children: dictgen::DictTrieChild::Flat(&WORD_DUR_CHILDREN),
value: Some(&["due"]),
value: None,
};

pub static WORD_DUR_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictgen::DictTable {
Expand Down Expand Up @@ -208789,7 +208781,7 @@ pub static WORD_ANH_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict

static WORD_ANG_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode {
children: dictgen::DictTrieChild::Flat(&WORD_ANG_CHILDREN),
value: Some(&["and"]),
value: None,
};

pub static WORD_ANG_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dictgen::DictTable {
Expand Down
Loading