Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions engine/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,5 @@ func (self *Configuration) IntArray(key string, def []int) []int {
}

func (self *Configuration) GetRandomUUID() string {
u, _ := uuid.NewV4()
return u.String()
return uuid.NewV4().String()
}
4 changes: 2 additions & 2 deletions nlp/accents.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Accent struct {
who AccentsModule
}

//Create the appropriate accents module (according to received options), and create a wrapper to access it.
// Create the appropriate accents module (according to received options), and create a wrapper to access it.
func NewAccent(lang string) *Accent {
this := Accent{}
if lang == "es" {
Expand All @@ -21,7 +21,7 @@ func NewAccent(lang string) *Accent {
return &this
}

//Wrapper methods: just call the wrapped accents module.
// Wrapper methods: just call the wrapped accents module.
func (this *Accent) FixAccentutation(candidates *set.Set, suf *sufrule) {
this.who.FixAccentuation(candidates, suf)
}
88 changes: 44 additions & 44 deletions nlp/preftree.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,59 +12,59 @@ func NewList() *List {
}

/*
func (this *List) push(c rune, wordEnd bool) interface {} {
n := this.find(c)
if n == nil {
if !wordEnd {
n = NewListRecBase(c)
} else {
n = NewListRecBase(c)
}
func (this *List) push(c rune, wordEnd bool) interface {} {
n := this.find(c)
if n == nil {
if !wordEnd {
n = NewListRecBase(c)
} else {
n = NewListRecBase(c)
}

if this.end != nil {
this.end.next = n
} else {
this.begin = n
}
this.end = n
} else if wordEnd {
tmp := this.begin
var prev *ListRecBase = nil
for tmp != n {
prev = tmp
tmp = tmp.next
}
if this.end != nil {
this.end.next = n
} else {
this.begin = n
}
this.end = n
} else if wordEnd {
tmp := this.begin
var prev *ListRecBase = nil
for tmp != n {
prev = tmp
tmp = tmp.next
}

if n == this.end {
this.end = nil
}
if n == this.end {
this.end = nil
}

ntmp := n.next
l := n.nextList
n = NewListRecData(c)
n.next = ntmp
n.nextList = l
ntmp := n.next
l := n.nextList
n = NewListRecData(c)
n.next = ntmp
n.nextList = l

if prev != nil {
prev.next = n
} else {
this.begin = n
}
if prev != nil {
prev.next = n
} else {
this.begin = n
}

if this.end == nil {
this.end = n
if this.end == nil {
this.end = n
}
}
}

if !wordEnd {
if n.nextList == nil {
n.nextList = NewList()
if !wordEnd {
if n.nextList == nil {
n.nextList = NewList()
}
return n.nextList
} else {
return n
}
return n.nextList
} else {
return n
}
}
*/
func (this *List) find(c rune) *ListRecBase {
if this.begin == nil {
Expand Down
4 changes: 2 additions & 2 deletions terminal/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func Errorf(message string, params ...interface{}) {
}

func ErrorI(messages ...interface{}) {
red.Print(messages)
red.Print(messages...)
}

func ErrorIln(messages ...interface{}) {
red.Println(messages)
red.Println(messages...)
}