Giter VIP home page Giter VIP logo

t2wml's Introduction

T2WML: A Cell-Based Language To Map Tables Into Wikidata Records

Installation

Operating system:macOS / OS X, Linux, Windows
Python version:Python 3.6+
  1. Clone the repository
  2. Open terminal/cmd in the project directory and type the following commands:
    pip install -r requirements.txt
    python -m spacy download en_core_web_sm
    python application.py
  3. Server is up and running at http://localhost:5000/

Usage Within Code

from driver import run_t2wml
run_t2wml(data_file_path,  wikified_output_path, t2wml_spec, output_directory, sheet_name, sparql_endpoint)

Arguments:

Mandatory Arguments:
    data_file_path: string
    wikified_output_path: string 
    t2wml_spec: string
    output_directory: string 
Optional Arguments:
    sheet_name: string
    sparql_endpoint: string

Default Values:

    sparql_endpoint = "https://dsbox02.isi.edu:8888/bigdata/namespace/wdq/sparql"

Edit in /app_config.py

Output:

The function will create a directory structure in the output directory which will have the results.ttl and changes.tsv files.

Output Directory Structure:

output_directory/
├── excel_file_name/
│   └── sheet_name/
|       ├── results.ttl
|       └── changes.tsv
└── csv_file_name/
    ├── results.ttl
    └── changes.tsv

Usage with GUI

  1. Open the GUI
  2. In Table Viewer,
    1. click Upload to open a table file (.csv/.xls/.xlsx)
  3. In Wikifier,
    1. define and wikify the regions you need [demo], and/or
    2. click Upload to open a wikifier file (.csv)
    3. correct mismatched qnode if necessary [demo]
  4. In YAML Editor,
    1. type/paste in T2WML code, or
    2. click Upload to open a YAML file (.yaml)
    3. click Apply to highlight some regions in Table Viewer
  5. In Output,
    1. preview result by clicking cell in Table Viewer [demo], or
    2. click Download to get all results

Features

Note: All screenshots below are captured in GUI v1.3. Minor inconsistencies may appear.

⬇️ Wikify region t2wml-gui-demo

⬇️ Modify qnode t2wml-gui-demo

⬇️ Preview result t2wml-gui-demo

FAQs

  • Installation failed due to etk?

    Run the following commands in terminal/cmd:

    pip uninstall etk
    pip install https://github.com/usc-isi-i2/etk/archive/development.zip
    
  • Login failed or encountered an authentication error like 400 (OAuth2 Error)?

    Access T2WML at http://localhost:5000/ instead of http://127.0.0.1:5000.

  • Encountered any other error not mentioned in the FAQs?

    Post the issue in the T2WML repository along with a detailed description.

t2wml's People

Contributors

bhatiadivij avatar jiashengwu avatar saggu avatar xkgoodbest avatar greatyyx avatar szeke avatar

Watchers

James Cloos avatar

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.