Skip to content
This repository has been archived by the owner on May 14, 2023. It is now read-only.

Commit

Permalink
Update CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jun 16, 2020
1 parent 5280125 commit 7d50d91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<<<<<<< HEAD
# prose [![Build Status](https://travis-ci.org/jdkato/prose.svg?branch=master)](https://travis-ci.org/jdkato/prose) [![Build status](https://ci.appveyor.com/api/projects/status/24bepq85nnnk4scr/branch/master?svg=true)](https://ci.appveyor.com/project/jdkato/prose/branch/master) [![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/jdkato/prose) [![Coverage Status](https://coveralls.io/repos/github/jdkato/prose/badge.svg?branch=master)](https://coveralls.io/github/jdkato/prose?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/jdkato/prose)](https://goreportcard.com/report/github.com/jdkato/prose) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/avelino/awesome-go#natural-language-processing)


`prose` is Go library for text (primarily English at the moment) processing that supports tokenization, part-of-speech tagging, named-entity extraction, and more. The library's functionality is split into subpackages designed for modular use.
=======
# prose [![Build Status](https://travis-ci.org/jdkato/prose.svg?branch=master)](https://travis-ci.org/jdkato/prose) [![Build status](https://ci.appveyor.com/api/projects/status/24bepq85nnnk4scr?svg=true)](https://ci.appveyor.com/project/jdkato/prose) [![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/gopkg.in/jdkato/prose.v2) [![Coverage Status](https://coveralls.io/repos/github/jdkato/prose/badge.svg?branch=v2)](https://coveralls.io/github/jdkato/prose?branch=v2) [![Go Report Card](https://goreportcard.com/badge/github.com/jdkato/prose)](https://goreportcard.com/report/github.com/jdkato/prose) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/avelino/awesome-go#natural-language-processing)

`prose` is a natural language processing library (English only, at the moment) in *pure Go*. It supports tokenization, segmentation, part-of-speech tagging, and named-entity extraction.
>>>>>>> v2

You can can find a more detailed summary on the library's performance here: [Introducing `prose` v2.0.0: Bringing NLP *to Go*](https://medium.com/@errata.ai/introducing-prose-v2-0-0-bringing-nlp-to-go-a1f0c121e4a5).

Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: "{build}"
os: Windows Server 2012 R2
clone_folder: c:\GOPATH\src\github.com\jdkato\prose
build: off
environment:
GOPATH: c:\GOPATH
init:
Expand Down
6 changes: 1 addition & 5 deletions extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,7 @@ func encode(corpus featureSet) *binaryMaxentClassifier {
for _, fname := range featureOrder {
fval := entry.features[fname]
key := strings.Join([]string{fname, fval}, "-")
if _, ok := count[key]; ok {
count[key]++
} else {
count[key] = 1
}
count[key]++
entry := strings.Join([]string{fname, fval, label}, "-")
if _, found := mapping[entry]; !found {
mapping[entry] = len(mapping)
Expand Down
12 changes: 2 additions & 10 deletions tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ func (m *averagedPerceptron) predict(features map[string]float64) string {
continue
}
for label, weight := range weights {
if _, ok := scores[label]; ok {
scores[label] += value * weight
} else {
scores[label] = value * weight
}
scores[label] += value * weight
}
}
return max(scores)
Expand Down Expand Up @@ -360,11 +356,7 @@ func featurize(i int, ctx []string, w, p1, p2 string) map[string]float64 {

func add(args []string, features map[string]float64) map[string]float64 {
key := strings.Join(args, " ")
if _, ok := features[key]; ok {
features[key]++
} else {
features[key] = 1
}
features[key]++
return features
}

Expand Down

0 comments on commit 7d50d91

Please sign in to comment.