package
0.0.80
Repository: https://github.com/alexamies/cnreader.git
Documentation: pkg.go.dev

# Functions

decodeUsageExample formats usage example text into links with highlight Return marked up text with links and highlight.
MarkVocabLink constructs a hyperlink for a headword, including Pinyin and English in the title attribute for the link mouseover.
MarkVocabSummary constructs a Summary HTML element for a headword.
newTemplateMap builds a template map.
WriteCollectionFile writes a HTML file describing the collection Parameters: collectionFile: The name of the file describing the collection baseDir: The base directory for writing the file.
WriteCollectionList writes a HTML file listing all collections.
WriteCorpusDoc writes a corpus document with markup for the array of tokens tokens: A list of tokens forming the document vocab: A list of word id's in the document filename: The file name to write to HTML template to use collectionURL: the URL of the collection that the corpus text belongs to collectionTitle: The collection title that the corpus entry belongs to aFile: The vocabulary analysis file written to or empty string for none sourceFormat: TEXT, or HTML used for formatting output.
WriteDoc writes a document with markup for the array of tokens tokens: A list of tokens forming the document vocab: A list of word id's in the document f: The writer to write to GlossChinese: whether to convert the Chinese text in the file to markVocabs.

# Structs

CollectionListContent holds content for the template of a list of collections.
CorpusEntryContent holds the content for a corpus entry to write to HTML.
CorpusEntryMeta holds metadata for a corpus entry.
HTMLContent holds content for the template.
HTMLOutPutConfig holds parameters for writing output to HTML.