linking

package
v0.0.0-...-5fecf9c Latest Latest
Warning

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

Go to latest
Published: May 11, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Entity linking package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	// Title of target Wikipedia article.
	Target string `json:"target"`

	// Raw n-gram count estimate.
	NGramCount float64 `json:"ngramcount"`

	// Total number of links to Target in Wikipedia.
	LinkCount float64 `json:"linkcount"`

	Commonness float64 `json:"commonness"`
	Senseprob  float64 `json:"senseprob"`

	// Offset of anchor in input string.
	Offset int `json:"offset"`

	// Length of anchor in input string.
	Length int `json:"length"`
}

Represents a mention of an entity.

type Semanticizer

type Semanticizer struct {
	// contains filtered or unexported fields
}

func Load

func Load(modelpath string) (sem *Semanticizer,
	settings *storage.Settings, err error)

Load a semanticizer (entity linker) from modelpath.

Also returns a settings object that represents the dumpparser settings used to generate the model.

func (Semanticizer) All

func (sem Semanticizer) All(s string) (cands []Entity, err error)

Get all candidate entity mentions in the string s.

func (Semanticizer) ExactMatch

func (sem Semanticizer) ExactMatch(s string) (cands []Entity, err error)

Get all candidate entity mentions for the string s.

A candidate entity's anchor text must be exactly s.

Jump to

Keyboard shortcuts

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