Giter VIP home page Giter VIP logo

dig-dictionary-extraction's Introduction

Faerie Entity Extraction

This is an implementation of faeire entity extraction, a dictionary-baesd entity extraction.

Installation and dependencies

pip install faerie

Usage

Run it in console

faerie sampledictionary.json sampledocuments.json sampleconfig.json

Or you can import and use it in your python code

import faerie
faerie.run("sampledictionary.json","sampledocuments.json","sampleconfig.json")

Example input and dictionary file format

{
  "Country": "united states",
  "State": "georgia",
  "AdministrativeArea": "douglas county",
  "name": "Woods Valley",
  "id": "4231869"
}

Example config file format

{
  "dictionary": {
    "id_attribute": "id",
    "value_attribute": [
      "name"
    ]
  },
  "document": {
    "id_attribute": "id",
    "value_attribute": [
      "name"
    ]
  },
  "token_size": 2,
  "threshold": 0.8
}

Arguments:

Required

  • documents a json file for extracting entities

And

  • dictionary a json file providing entities to extract

Optional

  • config a json file contains fields, tokensize and threshold

Output

{
  "entities": {
    "4231869": {
      "value": "Woods Valley",
      "candwins": [
        {
          "start": 64,
          "score": 11,
          "end": 74
        },
        {
          "start": 65,
          "score": 10,
          "end": 74
        },
        {
          "start": 196,
          "score": 10,
          "end": 206
        }
      ]
    }
  },
  "document": {
    "id": "4231868",
    "value": "The choice of San Diego golf enthusiasts and beginners alike is Woods Valley Golf Club. Stunning tree-lined fairways and beautiful rolling slopes highlight the 18-hole championship golf course at Woods Valley. Designed with an emphasis on strategy and shot-making, the course winds through the community, following the natural contours of the countryside."
  }
}

dig-dictionary-extraction's People

Contributors

szeke avatar saggu avatar

Stargazers

 avatar  avatar  avatar Binh Vu avatar Raj avatar Umut Topkara avatar TENSORTALK avatar Itsuki Toyota avatar Ramtin M. Seraj avatar

Watchers

James Cloos avatar  avatar Craig Knoblock avatar  avatar  avatar Dipsy Kapoor avatar Andrew Philpot avatar Yao-Yi Chiang avatar Diane avatar  avatar Majid Ghasemi Gol avatar Zheng Tang avatar  avatar

Forkers

binhlvu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.