Expand description
§harper-core
harper-core
is the fundamental engine behind Harper, the grammar checker for developers.
harper-core
is available on crates.io
. However, improving the API is not currently a high priority.
Feel free to use harper-core
in your projects.
If you run into issues, create a pull request.
§Features
concurrent
: Whether to use thread-safe primitives (Arc
vs Rc
). Disabled by default.
It is not recommended unless you need thread-safely (i.e. you want to use something like tokio
).
Re-exports§
pub use spell::Dictionary;
pub use spell::FstDictionary;
pub use spell::MergedDictionary;
pub use spell::MutableDictionary;
Modules§
- language_
detection - linting
- Frameworks and rules that locate errors in text.
- parsers
- patterns
Pattern
s are one of the more powerful ways to query text inside Harper, especially for beginners.- spell
Structs§
- Adverb
Data - Conjunction
Data - Document
- A document containing some amount of lexed and parsed English text.
- FatToken
- A
Token
that holds its content as a fatVec<char>
rather than as aSpan
. - Ignored
Lints - A structure that keeps track of lints that have been ignored by users.
- Lrc
- A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
- Mask
- Identifies portions of a
char
sequence that should not be ignored by Harper. - Noun
Data - Number
- Quote
- Span
- A window in a
char
sequence. - Token
- Verb
Data - Word
Metadata
Enums§
Traits§
- Char
String Ext - Extensions to character sequences that make them easier to wrangle.
- Masker
- A Masker is a tool that can be composed to eliminate chunks of text from being parsed. They can be composed to do things like isolate comments from a programming language or disable linting for languages that have been determined to not be English.
- Token
String Ext - Extension methods for
Token
sequences that make them easier to wrangle and query. - VecExt
Functions§
- make_
title_ case - make_
title_ case_ str - A helper function for
make_title_case
that uses Strings instead of char buffers. - remove_
overlaps - A utility function that removes overlapping lints in a vector, keeping the more important ones.
Type Aliases§
- Char
String - A char sequence that improves cache locality. Most English words are fewer than 12 characters.