Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

refactor: finish sorting what's noun v pronoun v nominal

hippietrail7f5df5b8a5c0
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dict
index 6e4dba0b2..b45dee42b 100644
--- a/harper-core/dictionary.dict
+++ b/harper-core/dictionary.dict
@@ -4592,11 +4592,11 @@ Hymen/2M
Hyperion/2M
Hyundai/1M
Hz/M
+I/8~sf
I'd/~
I'll/~
I'm/~
I've/~
-I/81M~sf
IA/21
IBM/21M
ICBM/1SM
@@ -21319,7 +21319,7 @@ e/18FDST
eBay/24M
eMusic/M
ea/1
-each/81
+each/-
eager/541PTRY
eagerness/1M
eagle/14MS
@@ -22497,7 +22497,7 @@ everglade/1SM
evergreen/514SM
everlasting/51MYS
evermore/
-every/
+every/-
everybody/8M
everyday/51
everyone/8M
@@ -26401,9 +26401,10 @@ hazing/14M
hazmat/1
hazy/51RTP
hdqrs/1
+he/8~st
he'd/
he'll/
-he/81M~st
+he's/
head/154MDRZGJS
headache/1MS
headband/1MS
@@ -26656,6 +26657,7 @@ heppest/5
heptagon/1MS
heptagonal/5
heptathlon/1SM
+her/-8ot
herald/14SMDG
heralded/4U
heraldic/5
@@ -26720,6 +26722,7 @@ herpetologist/1SM
herpetology/1M
herring/1MS
herringbone/14M
+hers/8
herself/8
hertz/1M
hesitance/1M
@@ -26753,7 +26756,7 @@ hf/
hgt/1
hgwy/1
hi/15D
-his/8
+his/8-
hiatus/1MS
hibachi/1MS
hibernate/4GNDS
@@ -26822,7 +26825,7 @@ hillside/1SM
hilltop/1MS
hilly/5PRT
hilt/14MS
-him/81Sot
+him/8ot
himself/8
hind/51MRZS
hinder/451GD
@@ -29021,9 +29024,10 @@ issue/14ADSMG
issuer/1MS
isthmian/51
isthmus/1MS
+it/8~sot
it'd/
it'll/
-it/815USM~sot
+it's/
ital/15
italic/51SM
italicization/1M
@@ -29040,6 +29044,7 @@ iteration/1AM
iterator/1S
itinerant/51SM
itinerary/15SM
+its/8-
itself/8
iv/U
ivory/15SM
@@ -31298,7 +31303,7 @@ manumitted/4
manumitting/4
manure/41MGDS
manuscript/51MS
-many/815M
+many/85M-
map's
map/14AS
maple/1SM
@@ -31557,7 +31562,7 @@ mayst/4
maze/14MS
mazurka/1MS
mdse/1
-me/81DSH~
+me/8~fo
mead/1M
meadow/14MS
meadowlark/1MS
@@ -31611,6 +31616,7 @@ mechanistic/5
mechanistically/
mechanization/1M
mechanize/4DSG
+med/1SM
medal/14SM
medalist/1MS
medallion/14SM
@@ -31916,7 +31922,7 @@ methodological/5Y
methodology/1SM
methotrexate/1
methought/4
-meths/1
+meth/1SM
methyl/1M
meticulous/5YP
meticulousness/1M
@@ -33089,7 +33095,7 @@ muzak/14
muzzily/
muzzle/14DSMG
muzzy/51P
-my/~5
+my/~-
mycologist/1SM
mycology/1M
myelitis/1M
@@ -34758,7 +34764,8 @@ ouch/14
ought/481
oughtn't/4
ounce/1MS
-our/4S~
+our/~-
+ours/8
ourselves/8
oust/4ZGDRS
ouster/14M
@@ -41441,7 +41448,7 @@ seventieth/51M
seventieths/1
seventy/SMH
sever/4ETGDS
-several/51MY
+several/5Y-
severance/1SM
severe/5YPR
severeness/1M
@@ -41576,9 +41583,10 @@ shaver/1M
shaving/14M
shawl/14MS
shay/1MS
+she/8~st
she'd/
she'll/
-she/81DM~st
+she's/
sheaf/14M
shear/415MDRSZG
shearer/1M
@@ -45490,7 +45498,7 @@ thanklessness/1M
thanksgiving/1SM
that'd/
that'll/
-that/7M~-
+that/78M~-
thatch/14MDRSZG
thatcher/1M
thatching/14M
@@ -45503,9 +45511,10 @@ theatrical/51YS
theatricality/1M
theatricals/1M
theatrics/1M
-thee/841-S
+thee/8no
theft/1SM
-their/S~
+their/~-
+theirs/8
theism/1M
theist/1SM
theistic/5
@@ -45575,7 +45584,7 @@ thermostatic/5
thermostatically/
thesauri/1
thesaurus/1MS
-these/~-
+these/8~-
theses/9M
thesis/1M
thespian/51SM
@@ -45633,7 +45642,7 @@ thirteenths/1
thirtieth/51M
thirtieths/1
thirty/1HSM
-this/~-
+this/8~-
thistle/1MS
thistledown/1M
thither/5
@@ -45651,8 +45660,8 @@ thoroughbred/51MS
thoroughfare/1MS
thoroughgoing/5
thoroughness/1M
-those/-
-thou/8417MS
+those/8-
+thou/8ns
though/74
thought/14SM
thoughtful/5YP
@@ -45760,7 +45769,7 @@ thus/1
thwack/41ZGSMDR
thwacker/1M
thwart/5+41GSMD
-thy/7
+thy/-
thyme/1M
thymine/1M
thymus/1MS
@@ -47336,6 +47345,7 @@ unique/51YTRP
uniqueness/1M
unisex/51M
unison/1M
+unit/1SM
unitary/51
unite/41AEGSD
unitedly/
@@ -49513,15 +49523,16 @@ yon/8
yonder/51
yonks/1
yore/1M
+you/8~son
you'd/
you'll/
you're/
you've/
-you/8SMH~son
young/514TMR
youngish/5
youngster/1MS
-your/S~
+your/~-
+yours/8
yourself/8
yourselves/8
youth/1M
diff --git a/harper-core/src/linting/compound_nouns/implied_action_compound_nominals.rs b/harper-core/src/linting/compound_nouns/implied_action_compound_nominals.rs
index 01a46712b..de3207e38 100644
--- a/harper-core/src/linting/compound_nouns/implied_action_compound_nominals.rs
+++ b/harper-core/src/linting/compound_nouns/implied_action_compound_nominals.rs
@@ -9,8 +9,8 @@ use crate::{
patterns::{Pattern, SequencePattern},
};
-/// Looks for closed compound nominals which can be condensed due to their position after a
-/// possessive nominal (which implies ownership).
+/// Looks for closed compound nouns which can be condensed due to their position after a
+/// possessive noun (which implies ownership).
pub struct ImpliedActionCompoundNouns {
pattern: Box<dyn Pattern>,
split_pattern: Lrc<SplitCompoundWord>,
@@ -18,7 +18,7 @@ pub struct ImpliedActionCompoundNouns {
impl Default for ImpliedActionCompoundNouns {
fn default() -> Self {
- let split_pattern = Lrc::new(SplitCompoundWord::new(|meta| meta.is_nominal()));
+ let split_pattern = Lrc::new(SplitCompoundWord::new(|meta| meta.is_noun()));
let pattern = SequencePattern::default()
.then(split_pattern.clone())
.then_whitespace()
@@ -51,7 +51,7 @@ impl PatternLinter for ImpliedActionCompoundNouns {
lint_kind: LintKind::WordChoice,
suggestions: vec![Suggestion::replace_with_match_case(word.to_vec(), orig)],
message: format!(
- "The verb here implies the existence of the closed compound nominal “{}”.",
+ "The verb here implies the existence of the closed compound noun “{}”.",
word.to_string()
),
priority: 63,
@@ -59,6 +59,6 @@ impl PatternLinter for ImpliedActionCompoundNouns {
}
fn description(&self) -> &str {
- "Detects split compound nominals preceding an action and suggests merging them."
+ "Detects split compound nouns preceding an action and suggests merging them."
}
}
diff --git a/harper-core/src/linting/compound_nouns/implied_ownership_compound_nominals.rs b/harper-core/src/linting/compound_nouns/implied_ownership_compound_nominals.rs
index 98feff505..820da721b 100644
--- a/harper-core/src/linting/compound_nouns/implied_ownership_compound_nominals.rs
+++ b/harper-core/src/linting/compound_nouns/implied_ownership_compound_nominals.rs
@@ -18,7 +18,7 @@ pub struct ImpliedOwnershipCompoundNouns {
impl Default for ImpliedOwnershipCompoundNouns {
fn default() -> Self {
- let split_pattern = Lrc::new(SplitCompoundWord::new(|meta| meta.is_nominal()));
+ let split_pattern = Lrc::new(SplitCompoundWord::new(|meta| meta.is_noun()));
let pattern = SequencePattern::default()
.then_possessive_nominal()
.then_whitespace()
diff --git a/harper-core/src/linting/left_right_hand.rs b/harper-core/src/linting/left_right_hand.rs
index 636cdabfe..0d641c025 100644
--- a/harper-core/src/linting/left_right_hand.rs
+++ b/harper-core/src/linting/left_right_hand.rs
@@ -16,7 +16,7 @@ impl Default for LeftRightHand {
.then_whitespace()
.t_aco("hand")
.then_whitespace()
- .then_nominal();
+ .then_noun();
Self {
pattern: Box::new(pattern),
@@ -71,7 +71,7 @@ mod tests {
}
#[test]
- fn does_not_correct_nominal_usage() {
+ fn does_not_correct_noun_usage() {
assert_suggestion_result(
"She raised her right hand.",
LeftRightHand::default(),
diff --git a/harper-core/src/linting/likewise.rs b/harper-core/src/linting/likewise.rs
index 195316861..0592e813a 100644
--- a/harper-core/src/linting/likewise.rs
+++ b/harper-core/src/linting/likewise.rs
@@ -22,7 +22,7 @@ impl Default for Likewise {
.then_whitespace()
.then_anything()
.then_whitespace()
- .then_nominal(),
+ .then_noun(),
)));
Self {
diff --git a/harper-core/src/linting/linking_verbs.rs b/harper-core/src/linting/linking_verbs.rs
index 269fc92c8..905e4aca2 100644
--- a/harper-core/src/linting/linking_verbs.rs
+++ b/harper-core/src/linting/linking_verbs.rs
@@ -11,7 +11,7 @@ impl Linter for LinkingVerbs {
let mut output = Vec::new();
for chunk in document.iter_chunks() {
- // The word prior to "is" must be a noun.
+ // The word prior to "is" must be a nominal (noun or pronoun).
for idx in chunk.iter_linking_verb_indices() {
let linking_verb = chunk[idx];
let linking_verb_text = document.get_span_content_str(linking_verb.span);
@@ -27,7 +27,7 @@ impl Linter for LinkingVerbs {
span: linking_verb.span,
lint_kind: LintKind::Miscellaneous,
message: format!(
- "Linking verbs like “{}” must be preceded by a noun.",
+ "Linking verbs like “{}” must be preceded by a noun or pronoun.",
linking_verb_text
),
..Default::default()
diff --git a/harper-core/src/linting/plural_conjugate.rs b/harper-core/src/linting/plural_conjugate.rs
index 92f00acea..a37aaea2c 100644
--- a/harper-core/src/linting/plural_conjugate.rs
+++ b/harper-core/src/linting/plural_conjugate.rs
@@ -101,12 +101,14 @@ mod tests {
);
}
- #[test]
- fn pronoun_singular() {
- assert_suggestion_result(
- "If he are testing it.",
- PluralConjugate::default(),
- "If he is testing it.",
- );
- }
+ // TODO disabled since it relied on the /1 affix flag which meant noun as well as singular
+ // TODO currently there is no way to mark number on pronouns without making them also nouns
+ // #[test]
+ // fn pronoun_singular() {
+ // assert_suggestion_result(
+ // "If he are testing it.",
+ // PluralConjugate::default(),
+ // "If he is testing it.",
+ // );
+ // }
}
diff --git a/harper-core/src/linting/pronoun_contraction/avoid_contraction.rs b/harper-core/src/linting/pronoun_contraction/avoid_contraction.rs
index 060cca2c9..8f950309b 100644
--- a/harper-core/src/linting/pronoun_contraction/avoid_contraction.rs
+++ b/harper-core/src/linting/pronoun_contraction/avoid_contraction.rs
@@ -11,9 +11,9 @@ pub struct AvoidContraction {
impl Default for AvoidContraction {
fn default() -> Self {
- let pattern = SequencePattern::aco("you're").then_whitespace().then(
- |tok: &Token, _source: &[char]| tok.kind.is_nominal() && !tok.kind.is_adjective(),
- );
+ let pattern = SequencePattern::aco("you're")
+ .then_whitespace()
+ .then(|tok: &Token, _source: &[char]| tok.kind.is_noun() && !tok.kind.is_adjective());
Self {
pattern: Box::new(pattern),
diff --git a/harper-core/src/linting/pronoun_contraction/should_contract.rs b/harper-core/src/linting/pronoun_contraction/should_contract.rs
index 4e876364e..af480636d 100644
--- a/harper-core/src/linting/pronoun_contraction/should_contract.rs
+++ b/harper-core/src/linting/pronoun_contraction/should_contract.rs
@@ -19,7 +19,7 @@ impl Default for ShouldContract {
.then_whitespace()
.t_aco("the")
.then_whitespace()
- .then_nominal(),
+ .then_noun(),
),
}
}
diff --git a/harper-core/src/linting/proper_nominal_capitalization_linters.rs b/harper-core/src/linting/proper_nominal_capitalization_linters.rs
index 703577a61..d58ff9c88 100644
--- a/harper-core/src/linting/proper_nominal_capitalization_linters.rs
+++ b/harper-core/src/linting/proper_nominal_capitalization_linters.rs
@@ -5,13 +5,13 @@ use crate::{Dictionary, make_title_case};
use crate::{Token, TokenStringExt};
use std::sync::Arc;
-pub struct ProperNominalCapitalizationLinter<D: Dictionary + 'static> {
+pub struct ProperNounCapitalizationLinter<D: Dictionary + 'static> {
pattern: Box<dyn Pattern>,
description: String,
dictionary: Arc<D>,
}
-impl<D: Dictionary + 'static> ProperNominalCapitalizationLinter<D> {
+impl<D: Dictionary + 'static> ProperNounCapitalizationLinter<D> {
pub fn new(
search_for: impl Pattern + 'static,
description: impl ToString,
@@ -30,7 +30,7 @@ impl<D: Dictionary + 'static> ProperNominalCapitalizationLinter<D> {
}
}
-impl<D: Dictionary + 'static> PatternLinter for ProperNominalCapitalizationLinter<D> {
+impl<D: Dictionary + 'static> PatternLinter for ProperNounCapitalizationLinter<D> {
fn pattern(&self) -> &dyn Pattern {
self.pattern.as_ref()
}
@@ -57,7 +57,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"Americas",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.then(WordSet::new(&["South", "North", "Central"]))
.then_whitespace()
@@ -68,7 +68,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"Australia",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
EitherPattern::new(vec![
// the states and territories
Box::new(
@@ -132,7 +132,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"OceansAndSeas",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
EitherPattern::new(vec![
Box::new(
SequencePattern::default()
@@ -178,7 +178,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"Canada",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
EitherPattern::new(vec![
// the provinces and territories
Box::new(
@@ -228,7 +228,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"Koreas",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.then(WordSet::new(&["South", "North"]))
.then_whitespace()
@@ -240,7 +240,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"Malaysia",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
EitherPattern::new(vec![
// multi-word states
Box::new(SequencePattern::default()
@@ -296,7 +296,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"ChineseCommunistParty",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::aco("Chinese")
.then_whitespace()
.t_aco("Communist")
@@ -309,7 +309,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"UnitedOrganizations",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("United")
.then_whitespace()
@@ -331,7 +331,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"Holidays",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
EitherPattern::new(vec![
Box::new(
SequencePattern::default()
@@ -481,7 +481,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"AmazonNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("Amazon")
.then_whitespace()
@@ -551,7 +551,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"GoogleNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("Google")
.then_whitespace()
@@ -586,7 +586,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"AzureNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("Azure")
.then_whitespace()
@@ -663,7 +663,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"MicrosoftNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("Microsoft")
.then_whitespace()
@@ -697,7 +697,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"AppleNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("Apple")
.then_whitespace()
@@ -743,7 +743,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"MetaNames",
- Box::new(ProperNominalCapitalizationLinter::new(SequencePattern::aco("Meta")
+ Box::new(ProperNounCapitalizationLinter::new(SequencePattern::aco("Meta")
.then_whitespace()
.then(EitherPattern::new(vec![
Box::new(WordSet::new(&[
@@ -763,7 +763,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"JetpackNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("Jetpack")
.then_whitespace()
@@ -814,7 +814,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"TumblrNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
SequencePattern::default()
.t_aco("Tumblr")
.then_whitespace()
@@ -834,7 +834,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"PocketCastsNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
EitherPattern::new(vec![
Box::new(
SequencePattern::default()
@@ -858,7 +858,7 @@ pub fn lint_group(dictionary: Arc<impl Dictionary + 'static>) -> LintGroup {
group.add(
"DayOneNames",
- Box::new(ProperNominalCapitalizationLinter::new(
+ Box::new(ProperNounCapitalizationLinter::new(
EitherPattern::new(vec![
Box::new(
SequencePattern::default()
diff --git a/harper-core/src/linting/use_genitive.rs b/harper-core/src/linting/use_genitive.rs
index 2bf88beb6..9674464f8 100644
--- a/harper-core/src/linting/use_genitive.rs
+++ b/harper-core/src/linting/use_genitive.rs
@@ -16,9 +16,9 @@ impl UseGenitive {
SequencePattern::default()
.then_one_or_more_adjectives()
.then_whitespace()
- .then_nominal(),
+ .then_noun(),
),
- Box::new(SequencePattern::default().then_nominal()),
+ Box::new(SequencePattern::default().then_noun()),
]),
));
diff --git a/harper-core/src/patterns/sequence_pattern.rs b/harper-core/src/patterns/sequence_pattern.rs
index 7db8d1394..1355af790 100644
--- a/harper-core/src/patterns/sequence_pattern.rs
+++ b/harper-core/src/patterns/sequence_pattern.rs
@@ -67,6 +67,7 @@ macro_rules! gen_then_from_is {
impl SequencePattern {
gen_then_from_is!(nominal);
+ gen_then_from_is!(noun);
gen_then_from_is!(possessive_nominal);
gen_then_from_is!(plural_nominal);
gen_then_from_is!(verb);
diff --git a/harper-core/src/spell/hunspell/expansion.rs b/harper-core/src/spell/hunspell/expansion.rs
index 00856fa9f..8c75cb26b 100644
--- a/harper-core/src/spell/hunspell/expansion.rs
+++ b/harper-core/src/spell/hunspell/expansion.rs
@@ -6,7 +6,7 @@ use crate::WordMetadata;
#[derive(Debug, Clone)]
pub struct Expansion {
- // TODO some attributes only signify a property and neither prefix nor suffix
+ // TODO some attributes only signify a property and neither a prefix nor a suffix
// TODO currently those have the "suffix" field set to true
/// If `!true`, this is a prefix
pub suffix: bool,
diff --git a/harper-core/src/spell/hunspell/mod.rs b/harper-core/src/spell/hunspell/mod.rs
index 7c15ef155..644bf97c2 100644
--- a/harper-core/src/spell/hunspell/mod.rs
+++ b/harper-core/src/spell/hunspell/mod.rs
@@ -162,10 +162,10 @@ mod tests {
attributes.expand_marked_words(words, &mut expanded);
let giant_data = expanded.get(&split("giant")).unwrap();
- assert!(giant_data.is_nominal());
+ assert!(giant_data.is_noun());
let giants_data = expanded.get(&split("giants")).unwrap();
- assert!(giants_data.is_plural_nominal());
+ assert!(giants_data.is_plural_noun());
}
fn build_expanded() -> HashMap<CharString, WordMetadata> {
@@ -209,7 +209,7 @@ mod tests {
build_expanded()
.get(&split("abandonment's"))
.unwrap()
- .is_possessive_nominal()
+ .is_possessive_noun()
)
}
diff --git a/harper-core/src/spell/mutable_dictionary.rs b/harper-core/src/spell/mutable_dictionary.rs
index 9728d9f77..734c9974e 100644
--- a/harper-core/src/spell/mutable_dictionary.rs
+++ b/harper-core/src/spell/mutable_dictionary.rs
@@ -327,13 +327,11 @@ mod tests {
assert!(dict.contains_word_str("This"));
}
- // TODO "this" is nominal but for now "nominal" is a synonym for "noun"
- // TODO but actually nouns are one type of nominal and "this" is a
- // TODO "determiner". for now we'll treat "determiner" under "article"
- // TODO though articles are a subclass of determiners.
- // TODO there is currently no is_determiner or is_article in WordMetadata
+ // TODO "this" is a determiner when used similarly to "the"
+ // TODO but when used alone it's a "demonstrative pronoun"
+ // TODO Harper previously wrongly classified it as a noun
// #[test]
- // fn this_is_nominal() {
+ // fn this_is_determiner() {
// let dict = MutableDictionary::curated();
// assert!(dict.get_word_metadata_str("this").unwrap().is_determiner());
// assert!(dict.get_word_metadata_str("This").unwrap().is_determiner());