Skip to content

Instantly share code, notes, and snippets.

@jdkato
jdkato / comp.md
Last active June 13, 2025 21:41
A comparison of open-source linters
Tool Extensible Checks Supports Markup
Vale Yes (via YAML) spelling, style Yes (Markdown, AsciiDoc, reStructuredText)
textlint Yes (via JavaScript) spelling, style Yes (Markdown, AsciiDoc, reStructuredText, Re:VIEW)
RedPen Yes (via Java) spelling, style Yes (Markdown, AsciiDoc, reStructuredText, Textile, LaTeX)
Rousseau Yes (via JavaScript) spelling, style No
write-good No style No
proselint No style No
Joblint No style
@jdkato
jdkato / terms.yml
Last active September 6, 2018 23:02
# `extends` specifies the extension point you're using. Here, we're
# using `substitution` to ensure correct usage of some techincal and
# brand-specifc terminology.
extends: substitution
# `message` allows you to customize the output shown to your users.
message: Use '%s' instead of '%s'.
# We're setting this rule's severity to `error`, which will cause
# CI builds to fail.
level: error
# We're using case-insensitive patterns.
package main
import (
"fmt"
"gopkg.in/jdkato/prose.v2"
)
func main() {
// Load our model, which we saved to a directory named "PRODUCT".
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"reflect"
func main() {
data, err := ioutil.ReadFile("reddit_product.jsonl")
if err != nil {
panic(err)
}
train, test := Split(ReadProdigy(data))
// Here, we're training a new model named PRODUCT with the training portion
// of our annotated data.
//
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"gopkg.in/jdkato/prose.v2"
{
"text": "This was taken during the Easter celebrations at Real de Catorce, MX.",
"spans": [
{
"start": 66,
"end": 68,
"text": "MX",
"rank": 0,
"label": "PRODUCT",
"score": 0.9525150387,
package main
import (
"gopkg.in/jdkato/prose.v2"
)
func main() {
// Where `ents` is `[]prose.LabeledEntity` from some external source.
//
// "iOS" is what we've named this model, but it can be anything.
package main
import (
"gopkg.in/jdkato/prose.v2"
)
func main() {
doc, _ := prose.NewDocument("Lebron James plays basketball in Los Angeles.")
for _, ent := range doc.Entities() {
fmt.Println(ent.Text, ent.Label)
Library Accuracy† 5-Run Average (seconds)
NLTK 0.893 7.224
prose 0.961 2.538