{ "info": { "author": "J. Fernando Sanchez", "author_email": "balkian@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "![GSI Logo](http://gsi.dit.upm.es/templates/jgsi/images/logo.png)\n[DoCon](http://demos.gsi.dit.upm.es/docon) \n==================================\n\nIntroduction\n---------------------\nThis tool will take several input formats and translates them to semantic formats. It focuses on translating corpora to the NIF+[Marl](http://gsi.dit.upm.es/ontologies/marl) format, using json-ld.\n\nDoCon is under heavy development. As of this writing, it supports:\n\n* Creating and administrating translation templates (admin level)\n* Editing templates to convert traditional formats (csv, tsv, xls, xml) formats to NIF+Marl+Onyx.\n* Using the available templates to translate known formats through this portal or via POST requests\n* Saving or outputting the result\n* HTTP API\n* Logging translation requests\n* Auto selection of the best template based on the input format\n\nIn the future, we might include the following features:\n* Conversion of semantic formats\n* Automatic translation between semantic formats (e.g. [RDF](http://www.w3.org/RDF/) to [JSON-LD](http://json-ld.org/))\n\nTranslating a document\n----------------------\nDocuments can be translated via the Web Interface, through the REST interface, or via Command-Line.\n\nDoCon's endpoint takes these parameters:\n\n * input (i): The original file to be translated\n * informat (f): The format of the original file\n * intype (t) [Optional]:\n * direct (default)\n * url\n * file\n * outformat (o):\n * json-ld\n * rdfxml\n * turtle (default, to comply with NIF)\n * ntriples\n * trix\n * base URI (u) [Optional]: base URI to use for the corpus\n * prefix (p) [Optional]: prefix to replace the base URI\n * language (l) [Optional]: language code (see dc:terms and [ISO 639](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) )\n * template (t) [Optional]: ID of the template to use. If it is omitted, a template to convert from informat to outformat will be used, or a template from informat to another format (e.g. json-ld), with automatic conversion (*to be done*).\n * toFile [Optional]: Whether the result should be sent in the response (default) or written to a file. For convenience, this value defaults to False when using the Web Form.\n\nUsing the command line tool *curl*, a request can be made like this:\n\n curl -F\"template=Example_to_Marl\" -F\"input=@input-file.csv\" -F\"intype=FILE\"\n http://demos.gsi.dit.upm.es/docon/process\n > result.jsonld\n\nTemplates\n---------\nDoCon templates are custom jinja2 templates with syntactic sugar, custom preferences and functions to deal with different document types.\n\nFor instance, this is a template that prints each cell in a csv file in a separate line, adding a dashed line between rows:\n\n {% set file = open_file(informat=\"csv\", delimiter=',') %}\n {% for row in file %}\n {% for item in row %}\n {{ item.strip() }}\n {% endfor %}\n {{ \"------\" if not loop.last }}\n {% endfor %}\n\nThis is the alternative and cleaner form of the same template using jinja's line expressions:\n\n % set file = open_file(informat=\"csv\", delimiter=',') \n % for row in file \n % for item in row \n {{ item.strip() }}\n % endfor \n {{ \"------\" if not loop.last }}\n % endfor \n\nCommand-line tool\n-----------------\nIn addition to providing an endpoint, this tool can be used directly in the command line.\nJust install the package and run:\n\n docon -i --template -o \n\nIf you don't want to install the package, you can also run it like a normal python module:\n\n python -m docon.cli -i --template -o \n\nInstallation instructions\n------------------------------\nThe easy way:\n\n pip install docon\n\nThat will allow you to use the CLI tool right away.\nSo far, if you want to run the server, you will need to run your own wsgi script or copy wsgi.py from this repository.\n\nTo install it from source, follow these steps:\n\n* Copy the docon/settings-private.py.template to docon/settings-private.py\n* Add your database information to settings.py\n* Create a virtualenv (preferably, in the project root)\n* Install the required packages:\n```\n pip install -r requirements.txt\n```\n* Test the environment with:\n```\n python manage.py runserver localhost:\n```\n\nIf the standalone server works, you can try serving the portal via apache/nginx and WSGI. It has been tested with apache2 and uwsgi. In that case you will also need to serve the static files from your web server. An example configuration for Apache2 would be:\n\n```\n\n\n [ ... ]\n\n WSGIScriptAlias /docon /path_to_docon/wsgi.py\n WSGIDaemonProcess docon user=www-data group=www-data processes=nprocesses threads=nthreads python-path=/path_to_docon:/path_to_docon/venv/lib/python2.7/site-packages\n WSGIProcessGroup docon\n \n Order allow,deny\n Allow from all\n \n\n Alias /docon/robots.txt /path_to_docon/static/robots.txt\n Alias /docon/favicon.ico /path_to_docon/static/favicon.ico\n\n AliasMatch ^docon/([^/]*\\.css) /path_to_docon/static/styles/$1\n\n Alias /docon/media/ /path_to_docon/media/\n Alias /docon/static/ /path_to_docon/static/\n\n \n Order deny,allow\n Allow from all\n Options -Indexes\n \n\n \n Order deny,allow\n Allow from all\n Options -Indexes\n \n\n\n```\n\nAcknowledgement\n---------------\nEUROSENTIMENT PROJECT\nGrant Agreement no: 296277\nStarting date: 01/09/2012\nProject duration: 24 months\n\n![Eurosentiment Logo](logo_grande.png)\n![FP7 logo](logo_fp7.gif)\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/gsi-upm/docon/archive/0.1.3.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gsi-upm/docon", "keywords": "conversion,templates,flask,celery,eurosentiment,nif,gsi", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "docon", "package_url": "https://pypi.org/project/docon/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/docon/", "project_urls": { "Download": "https://github.com/gsi-upm/docon/archive/0.1.3.tar.gz", "Homepage": "https://github.com/gsi-upm/docon" }, "release_url": "https://pypi.org/project/docon/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "A sentiment analysis server implementation. Designed to be extendable, so new algorithms and sources can be used.", "version": "0.1.3" }, "last_serial": 4791865, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "3335bc81b924ee6cf6214c09a2a404da", "sha256": "ef7df5ff6ea88fb7184b20c5791e1dd2165e1e5ddc339e42a80ce8cf09294fd1" }, "downloads": -1, "filename": "docon-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3335bc81b924ee6cf6214c09a2a404da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77304, "upload_time": "2015-03-27T06:06:46", "url": "https://files.pythonhosted.org/packages/e1/08/e9c43c4248757740c5ef87cdb45835fa3a22520b2c2a3ad0201ae87cda2f/docon-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "cca819fb6efc8071199233f83afabf00", "sha256": "a90d15e94ad181283e238ba313afbcf4ea7ace3f9aeb9bb46373df1ef6c49df4" }, "downloads": -1, "filename": "docon-0.1.2.tar.gz", "has_sig": false, "md5_digest": "cca819fb6efc8071199233f83afabf00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77689, "upload_time": "2015-05-25T11:32:35", "url": "https://files.pythonhosted.org/packages/48/6e/eebd40854bcf8bec1a3245d1e2c3dc1debf729dc795e24b084f812874af9/docon-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "5581ed6d63f5f1ab9384a59ef5e9a63b", "sha256": "e53a8e932b5ca2792f8765158139aebb4f0cdd8b49d95747872fed9bb0f77ee8" }, "downloads": -1, "filename": "docon-0.1.3.tar.gz", "has_sig": false, "md5_digest": "5581ed6d63f5f1ab9384a59ef5e9a63b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77738, "upload_time": "2015-05-26T22:30:19", "url": "https://files.pythonhosted.org/packages/ee/27/02ff7e533d4a9568b82f24b3bd767fab767b5983542600613829e59b9fe3/docon-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5581ed6d63f5f1ab9384a59ef5e9a63b", "sha256": "e53a8e932b5ca2792f8765158139aebb4f0cdd8b49d95747872fed9bb0f77ee8" }, "downloads": -1, "filename": "docon-0.1.3.tar.gz", "has_sig": false, "md5_digest": "5581ed6d63f5f1ab9384a59ef5e9a63b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77738, "upload_time": "2015-05-26T22:30:19", "url": "https://files.pythonhosted.org/packages/ee/27/02ff7e533d4a9568b82f24b3bd767fab767b5983542600613829e59b9fe3/docon-0.1.3.tar.gz" } ] }