dybmimport

package
v0.0.0-...-8a04628 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const AsciiNumDiff = 48 // the difference between the ascii code of a number and the number. E. g. the ascii code of the number 3 is 51
View Source
const MaxRelatedWordsPerWord = 20

Variables

View Source
var DataFolder string

Functions

func HandleCombineImport

func HandleCombineImport(w http.ResponseWriter, r *http.Request)

HandleCombineImport handles the /combine-import URL and does all the work It combines individual ngram files into one ngram file per letter using the Composer

func HandleImport

func HandleImport(w http.ResponseWriter, r *http.Request)

HandleImport handles the /import URL

func HandleProcess

func HandleProcess(w http.ResponseWriter, r *http.Request)

HandleProcess handles the /process URL and does all the work It takes all the imported ngrams and tries to guess:

  • the number of syllables
  • th pronunciation

func Setup

func Setup(dataFolder string)

Types

type CombineImportData

type CombineImportData struct {
	CombinedFiles []CombinedFile `json:"combined_files"`
}

type CombinedFile

type CombinedFile struct {
	N           int      `json:"n"`
	Letter      string   `json:"letter"`
	SourceFiles []string `json:"source_files"`
	TargetFile  string   `json:"target_file"`
}

type ImportData

type ImportData struct {
	UrlsFilename  string   `json:"urls_filename"`
	ProcessedUrls []string `json:"processed_urls"`
}

type Ngram

type Ngram struct {
	OriginalText string
	Text         string
	Frequency    int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL