Struct jmdict_enums::Priority [−][src]
pub struct Priority { pub news: PriorityInCorpus, pub ichimango: PriorityInCorpus, pub loanwords: PriorityInCorpus, pub additional: PriorityInCorpus, pub frequency_bucket: u16, }
Expand description
Relative priority of a ReadingElement or KanjiElement.
The various fields indicate if the vocabulary appears in various references, which can be taken as an indivication of the frequency with which it is used.
For the sake of encoding efficiency, this struct is not a perfect representation of the data in
the JMdict. Some entries in the JMdict are marked with contradictory priority information. In
this case, Priority
will only contain the values corresponding to the highest priority. For
example, a priority of ichi1,ichi2,news1,nf09
is represented as:
let p = Priority { news: Primary, ichimango: Primary, //"ichi2" gets ignored loanwords: Absent, additional: Absent, frequency_bucket: 9, };
Fields
news: PriorityInCorpus
If not Absent
, this vocabulary appears in the wordfreq file compiled by Alexandre Girardi
from the Mainichi Shimbun. (A copy of the file can be obtained from the EDRDG.)
ichimango: PriorityInCorpus
If not Absent
, this vocabulary appears in the book “1万語語彙分類集” (Ichimango goi
bunruishuu) by Senmon Kyouiku Publishing, Tokyo, 1998. The entries with priority Secondary
were demoted from Primary
because they were observed to have low frequencies in the WWW
and newspapers.
loanwords: PriorityInCorpus
If not Absent
, this vocabulary is a common loanword that appears in the wordfreq file.
additional: PriorityInCorpus
This covers a small number of words when they are detected as being common, but are not included in the above corpora.
frequency_bucket: u16
If self.news != Absent
, this field contains a value between 1 and 48, indicating the
frequency-of-use ranking for this vocabulary in the wordfreq file. The value 1 is used for
the 500 most common words, the value 2 is used for the 500 next most common words, and so
on. If self.news == Absent
, this value will be 0.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Priority
impl UnwindSafe for Priority
Blanket Implementations
Mutably borrows from an owned value. Read more