File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ pub struct DictWordMetadata {
4343 pub common : bool ,
4444 #[ serde( default = "default_none" ) ]
4545 pub derived_from : Option < WordId > ,
46- /// Generated by a chunker. Declares whether the word is a member of a nominal phrase.
46+ /// Generated by a chunker. Declares whether the word is a member of a nominal phrase. Using
47+ /// this should be preferred over the similarly named `Pattern`.
48+ ///
49+ /// For more details, see [the announcement blog post](https://elijahpotter.dev/articles/training_a_chunker_with_burn).
4750 pub np_member : Option < bool > ,
4851 /// Generated by a POS tagger. Declares what it inferred the word's part of speech to be.
4952 pub pos_tag : Option < UPOS > ,
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ use crate::Token;
22
33use super :: Pattern ;
44
5+ /// A pattern that uses primitive syntax-tree heuristics to locate nominal phrases.
6+ /// Given that it does not take context into account, it is not recommended for new code.
7+ /// Please prefer [`DictWordMetadata::np_member`](crate::DictWordMetadata::np_member).
58#[ derive( Default ) ]
69pub struct NominalPhrase ;
710
Original file line number Diff line number Diff line change @@ -627,7 +627,7 @@ newest-dict-changes *numCommits:
627627 });
628628 });
629629
630- # Print the input string or file with nominal phrases highlighted.
630+ # Print the input string or file with nominal phrases highlighted. These are generated using Harper ' s chunker.
631631getnps text:
632632 cargo run --bin harper-cli -- nominal-phrases "{{ text}} "
633633
You can’t perform that action at this time.
0 commit comments