textprocessing

package module
v0.0.0-...-bbd23e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2017 License: MIT Imports: 6 Imported by: 0

README

API client for text-processing.com

This is a small wrapper / client for the natural language processing API's found at text-processing.com.

The website provides 4 API's:

  1. Stemming and Lemmatization API
  2. Sentiment Analysis API
  3. Tagging and Chunk Extraction API
  4. Phrase Extraction and Named Entity Recognition API

The original API is documented at: http://text-processing.com/docs/index.html

Stemming and Lemmatization API

API documented at: http://text-processing.com/docs/phrases.html

Status: Not implemented yet

Sentiment Analysis API

API documented at: http://text-processing.com/docs/phrases.html

Status: Not implemented yet

Tagging and Chunk Extraction API

API documented at: http://text-processing.com/docs/phrases.html

Status: Not implemented yet

Phrase Extraction and Named Entity Recognition API

API documented at: http://text-processing.com/docs/phrases.html

Example

This example comes from phrase_test.go:

result, err := ExtractPhrase("John hit the ball.")

Then result contains:

map[
    DATE:[ball] 
    PERSON:[John] 
    VP:[hit] 
    LOCATION:[John]
]

License

The MIT License (MIT). Please see the LICENSE file for more information.

Documentation

Overview

Package textprocessing is a golang wrapper / client for the text-processing.com APIs.

Index

Constants

View Source
const PhraseApiUrl = "http://text-processing.com/api/phrases/"

Variables

This section is empty.

Functions

This section is empty.

Types

type PhraseExtractionResult

type PhraseExtractionResult map[string][]string

PhraseExtractionResult represents a result from the Phrase Extraction API.

func ExtractPhrase

func ExtractPhrase(text string) (PhraseExtractionResult, error)

ExtractPhrase sends the given text to the Phrase Extraction and Named Entity Recognition API and results gives the result back. Use this for English-only analysis.

func ExtractPhraseByLanguage

func ExtractPhraseByLanguage(text string, language string) (PhraseExtractionResult, error)

ExtractPhrase sends the given text to the Phrase Extraction and Named Entity Recognition API with the provided language as context and results gives the result back.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL