Skip to content

Quotes not tagged correctly #73

Description

@jrschumacher

Expect: Quotes to be tagged as quotes

Given

package main

import (
	"fmt"
	"log"

	"github.com/jdkato/prose/v2"
)

func main() {
	doc, err := prose.NewDocument("Bob said \"Alice, could you send me the key?\" Alice shook her head no.")

	if err != nil {
		log.Fatal(err)
	}

	// Iterate over the doc's tokens:
	fmt.Println("Tokens")
	fmt.Println(doc.Tokens())
	fmt.Println()

	// Iterate over the doc's named-entities:
	fmt.Println("Entities")
	fmt.Println(doc.Entities())
	fmt.Println()

	// Iterate over the doc's sentences:
	fmt.Println("Sentences")
	fmt.Println(doc.Sentences())
	fmt.Println()
}

Then

Tokens
[{NNP Bob B-PERSON} {VBD said O} {NNP " O} {NNP Alice O} {, , O} {MD could O} {PRP you O} {VB send O} {PRP me O} {DT the O} {NN key O} {. ? O} {JJ " O} {NNP Alice O} {VBD shook O} {PRP$ her O} {NN head O} {DT no O} {. . O}]

Entities
[{Bob PERSON}]

Sentences
[{Bob said "Alice, could you send me the key?"} {Alice shook her head no.}]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions