package
Version:
v0.0.0-...-c6bdbe1
Opens a new window with list of versions in this module.
Published: Jul 13, 2022
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
StripColors cleans any color related unprintable symbols
type CSV struct {
Path string
}
CSV is .csv store backend for words. Compliantly simple. Read full file from disk.
Save method will override whole file.
NewCSV open creates new CSV store. Creates a new CSV file, if it does not exist.
AddWord adds new word in words collection and saves on disc
GetWords loads words and put in into a heap according the score
Save saves Word into CSV file
Word is word for learning with all required metadata.
NewWord create a new Word instance, including try to get word metadata form
VerbFormen.
func (w *Word) DecScore()
DecScore decrease particular Word score
GetMeta returns formatted Meta
GetMetaWithoutColors return pure string without ASCII colors
HasMeta indicate if Word has Meta data
func (w *Word) IncScore()
IncScore increases particular Word score
Words is a heap of Word's
IsEmpty returns false if heap is empty
Len Less Swap Push Pop needs to implement heap interface
Next pops and returns next word
Pop remove last word from heap and returns it
Source Files
¶
Click to show internal directories.
Click to hide internal directories.