Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { RawParse(query string) (string, error) Parse(query string) (*Sentence, error) }
Client parses the given plain texts
type CommandClient ¶
type CommandClient struct {
// contains filtered or unexported fields
}
CommandClient execute the given command
func NewCommandClient ¶
func NewCommandClient(command string, options ...string) (*CommandClient, error)
NewCommandClient creates a new CommandClient
type DependencyInfo ¶
DependencyInfo handles dependency information of bunsetsu or basic phrases
func NewDependencyInfo ¶
func NewDependencyInfo(line string) (*DependencyInfo, error)
NewDependencyInfo creates a new DependencyInfo with the given line
func (*DependencyInfo) GetPredRep ¶
func (depi *DependencyInfo) GetPredRep() string
GetPredRep returns the "rep" for the DependencyInfo
type DependencyInfos ¶
type DependencyInfos []*DependencyInfo
DependencyInfos is a slice of DependencyInfo
type Document ¶
type Document struct {
Sentences Sentences
}
Document is a set of sentences
func NewDocument ¶
NewDocument creates Document
func (*Document) GetSentenceIndex ¶
GetSentenceIndex returns the index by SID
type Juman ¶
type Juman struct {
*CommandClient
}
Juman is a client to execute juman command or jumanpp command
type JumanSocketClient ¶
type JumanSocketClient struct {
*SocketClient
}
JumanSocketClient is a client to a communicete juman server
func NewJumanSocketClient ¶
func NewJumanSocketClient(address string) (*JumanSocketClient, error)
NewJumanSocketClient creates a new JumanSocketClient
type KnpSocketClient ¶
type KnpSocketClient struct {
*SocketClient
}
KnpSocketClient is a client to a communicete knp server
func NewKnpSocketClient ¶
func NewKnpSocketClient(address string) (*KnpSocketClient, error)
NewKnpSocketClient creates a new KnpSocketClient
type Morpheme ¶
type Morpheme struct { Doukeis Morphemes Surface string //Midashi Pronunciation string //Yomi RootForm string //Genkei Pos0 string //Hinshi Pos0ID int //HinshiID Pos1 string //Bunrui Pos1ID int //BunruiID CType string //Katsuyou1 CTypeID int //Katsuyou1ID CForm string //Katsuyou2 CFormID int //Katsuyou2ID Seminfo string //Seminfo Rep string //Rep Features Features //Features by KNP }
Morpheme is a morpheme
func NewMorpheme ¶
NewMorpheme returns a morpheme for the given line
type Sentence ¶
type Sentence struct { Morphemes ID string Bunsetsus DependencyInfos BasicPhrases DependencyInfos MorphemePositions []int BasicPhrasePositions []int BasicPhraseMorphemeIndexs []int // contains filtered or unexported fields }
Sentence includes elements of a sentence
func NewSentence ¶
NewSentence creats a sentence with the given text
func (*Sentence) GetMorphemes ¶
GetMorphemes returns morpheme of the sentence
type SocketClient ¶
type SocketClient struct {
// contains filtered or unexported fields
}
SocketClient communicates to a server with a socket
func NewSocketClient ¶
func NewSocketClient(address string, option string) (*SocketClient, error)
NewSocketClient creats a SocketClient