Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Chinese-English dictionary type definitions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCJKChar ¶ added in v0.0.28
IsCJKChar tests whether the symbol is a CJK character, excluding punctuation Only looks at the first charater in the string
func NormalizePinyin ¶ added in v0.0.92
Removes the tone diacritics from a Pinyin string
Types ¶
type DictionaryConfig ¶ added in v0.0.23
DictionaryConfig encapsulates parameters for dictionary configuration
type Word ¶
A top level word structure that may include multiple word senses
func CloneWord ¶ added in v0.0.18
Clones the headword definition without the attached array of word senses
func (Word) HasNotesLabel ¶ added in v0.0.51
HasNotesLabel tests whether the term has a label with the given value.
func (Word) IsProperNoun ¶ added in v0.0.21
IsProperNoun tests whether the word is a proper noun. If the majority of word senses are proper nouns, then the word is marked as a proper noun.
type WordSense ¶
type WordSense struct {
Id, HeadwordId int
Simplified, Traditional, Pinyin, English, Grammar, Concept, ConceptCN, Domain,
DomainCN, Subdomain, SubdomainCN, Image, MP3, Notes string
}
Defines a single sense of a Chinese word
func (*WordSense) IsFunctionWord ¶ added in v0.0.19
Tests whether the word is a function word
type WordSenses ¶ added in v0.0.22
type WordSenses []WordSense
May be sorted into descending order with most frequent bigram first
func (WordSenses) Len ¶ added in v0.0.22
func (senses WordSenses) Len() int
func (WordSenses) Less ¶ added in v0.0.22
func (senses WordSenses) Less(i, j int) bool
func (WordSenses) Swap ¶ added in v0.0.22
func (senses WordSenses) Swap(i, j int)