process

package
v0.0.0-...-abc66c6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clitic

type Clitic struct {
	Accent       int
	AccentedType string
	Type         string
	Pos          int
}

Clitic contains clitic analysis data

type Data

type Data struct {
	OriginalText string
	ReturnSAMPA  bool
	Text         string

	Words []*ProcessedWord

	Result []*api.ResultWord
}

Data working data for one request

type MainWorker

type MainWorker struct {
	// contains filtered or unexported fields
}

MainWorker does transcription work

func (*MainWorker) Add

func (mw *MainWorker) Add(pr Processor)

Add adds a processor to the end

func (*MainWorker) Process

func (mw *MainWorker) Process(input string, returnSAMPA bool) ([]*api.ResultWord, error)

Process is main method

type ProcessedWord

type ProcessedWord struct {
	Tagged             TaggedWord
	AccentVariant      *extapi.AccentVariant
	AccentCount        int
	Mihs               []string
	TranscriptionCount int
	Transcription      string
	IPA                string
	Clitic             *Clitic
}

ProcessedWord keeps one word info

type Processor

type Processor interface {
	Process(*Data) error
}

Processor does one specific step

type StringTypeEnum

type StringTypeEnum int

StringTypeEnum represent possible string types

const (
	//Word value
	Word StringTypeEnum = iota + 1
	//OtherWord value
	OtherWord
	//Separator value
	Separator
	//Space value
	Space
	//SentenceEnd value - data normalized by user
	SentenceEnd
)

type TaggedWord

type TaggedWord struct {
	Type   StringTypeEnum
	String string
	Mi     string
	Lemma  string
}

TaggedWord - tagger's result

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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