Code Monkey home page Code Monkey logo

itu-turkish-nlp-pipeline-caller's Introduction

ITU Turkish NLP Pipeline Caller

A Python3 tool to use ITU Turkish NLP Pipeline API

Build Status

For details of the pipeline, please check the pipeline page and the sources below.

Gülşen Eryiğit . ITU Turkish NLP Web Service In Proceedings of the Demonstrations at the 14th Conference of the European Chapter of the Association for Computational Linguistics (EACL 2014). Gothenburg, Sweden, April 2014.

Gülşen Eryiğit, Joakim Nivre, and Kemal Oflazer. Dependency Parsing of Turkish. Computational Linguistics, 34 no.3, 2008.

Usage

To be able to use the pipeline, you need an authentication token (details on API web page).

As a Command Line Tool

The tool reads the token from pipeline.token file (under the same directory with the tool) by default.

Simply python3 ./pipeline.caller.py filename reads input file , prints the output under ./output/output<system_time>

You can select the pipeline tool by using -t option python3 ./pipeline.caller.py filename -t <tool_name> default is "pipelineNoisy"

You can force the encoding for I/O by using -e option python3 ./pipeline.caller.py filename -e <encoding> default is your system locale

And you can change the output directory by using -o option python3 ./pipeline.caller.py filename -o another_directory default is "pipeline_caller_output"

Also python3 ./pipeline.caller.py --help shows the help menu.

Using As a Module

import pipeline_caller

caller = pipeline_caller.PipelineCaller()

result = caller.call(<tool_name>, <text>, <api_token>)

Defaults (Optional)

Check DEFAULTS block in the source code if you need (generally, you don't) to change one of these:

api_url = "http://tools.nlp.itu.edu.tr/SimpleApi"

pipeline_encoding = 'UTF-8'

token_path = "pipeline.token" for command line tool

default_output_dir = "output"

default_enconding = locale.getpreferredencoding(False) default encoding in your OS, for I/O operations in command line tool

default_separator_char_class = "[\.\?:;!]" for command line tool, to separate sentences and process sentence by sentence

Author, Copyright & License

Copyright 2015 Ferit Tunçer, [email protected]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

itu-turkish-nlp-pipeline-caller's People

Contributors

0xferit avatar jacobcward avatar

Watchers

 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.