skyset

package
v0.0.0-...-876d392 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNK  group = iota
	NOUN group = iota
	VERB group = iota
	QUAL group = iota
	CXN  group = iota
)

Enumeration of group

Variables

This section is empty.

Functions

This section is empty.

Types

type PennPOS

type PennPOS uint8

PennPOS represents Penn Tree Part of Speech

const (
	CC   PennPOS = iota
	CD   PennPOS = iota
	DT   PennPOS = iota
	EX   PennPOS = iota
	FW   PennPOS = iota
	IN   PennPOS = iota
	JJ   PennPOS = iota
	JJR  PennPOS = iota
	JJS  PennPOS = iota
	LS   PennPOS = iota
	MD   PennPOS = iota
	NN   PennPOS = iota
	NNS  PennPOS = iota
	NNP  PennPOS = iota
	NNPS PennPOS = iota
	PDT  PennPOS = iota
	POS  PennPOS = iota
	PRP  PennPOS = iota
	PRPS PennPOS = iota
	RB   PennPOS = iota
	RBR  PennPOS = iota
	RBS  PennPOS = iota
	RP   PennPOS = iota
	SYM  PennPOS = iota
	TO   PennPOS = iota
	UH   PennPOS = iota
	VB   PennPOS = iota
	VBD  PennPOS = iota
	VBG  PennPOS = iota
	VBN  PennPOS = iota
	VBP  PennPOS = iota
	VBZ  PennPOS = iota
	WDT  PennPOS = iota
	WP   PennPOS = iota
	WPS  PennPOS = iota
	WRB  PennPOS = iota
	PUNC PennPOS = iota
)

Enumeration of PennPOS

func GetPennPOS

func GetPennPOS(s string) PennPOS

GetPennPOS converts string representation to matching const

func (PennPOS) Byte

func (p PennPOS) Byte() byte

Byte converts const to single byte representation

func (PennPOS) MarshalJSON

func (p PennPOS) MarshalJSON() ([]byte, error)

MarshalJSON converts PennPOS into string representation in json encoding

func (PennPOS) String

func (p PennPOS) String() string

String returns string representation for PennPOS

func (*PennPOS) UnmarshalJSON

func (p *PennPOS) UnmarshalJSON(js []byte) (err error)

UnmarshalJSON decodes PennPOS from json representation

type Phrase

type Phrase struct {
	Synth  Synth   `json:"synth"`
	Tokens []Token `json:"tokens"`
}

Phrase is a series of words within one Synth

func BuildPhrases

func BuildPhrases(s string) []Phrase

BuildPhrases takes a sentence as a string and returns the skyset phrases that make up that sentence

type Synth

type Synth int8

Synth is a type of phrase, skyset category

const (
	UNKNOWN    Synth = iota
	TOPIC      Synth = iota
	ACTION     Synth = iota
	RESOURCE   Synth = iota
	PROCESS    Synth = iota
	CONDITION  Synth = iota
	CONNECTION Synth = iota
)

Enumeration of Synth

func GetSynth

func GetSynth(s string) Synth

GetSynth converts the string representation to the const value

func (Synth) MarshalJSON

func (s Synth) MarshalJSON() ([]byte, error)

MarshalJSON returns string representation in json form of Synth

func (Synth) String

func (s Synth) String() string

String returns the string representation of Synth

func (*Synth) UnmarshalJSON

func (s *Synth) UnmarshalJSON(js []byte) (err error)

UnmarshalJSON decodes string representation from json of Synth

type Token

type Token struct {
	Text string  `json:"word"`
	Pos  PennPOS `json:"pos"`
}

Token represent a single word

Jump to

Keyboard shortcuts

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