Metadata-Version: 2.1
Name: wikitablewrapper
Version: 0.2.6
Summary: Parsing, Proccesing, Annotating and Storing WikiTables in Json
Home-page: https://gitlab.com/hrosmendez/wikitablewrapper
Author: Henry Rosales
Author-email: hrosmendez@gmail.com
License: UNKNOWN
Description: # wikitablewrapper
        
        
        **Install virtual ennvironment of python3**
        ```sh
        sudo apt-get install curl
        sudo apt install python3-pip
        sudo apt install virtualenv
        virtualenv env --python=python3
        cd env && source bin/activate
        ```
        
        **Install dependencies**
        ```sh
        pip3 install simplejson
        pip3 install xmltodict
        ```
        
        **Install locally DBpedia Spotlight**
        Ubuntu
        ```sh
        sudo snap install docker
        ```
        or Debian
        ```sh
        wget https://download.docker.com/linux/debian/dists/jessie/pool/stable/amd64/docker-ce_17.03.0~ce-0~debian-jessie_amd64.deb
        sudo dpkg -i docker-ce_17.03.0~ce-0~debian-jessie_amd64.deb
        ```
        
        See if you have the image already in your computer
        ```sh
        sudo docker image ls
        ```
        if you don't have it, then run
        ```sh
        sudo docker pull dbpedia/spotlight-english
        sudo docker run -d -p 2222:80 dbpedia/spotlight-english spotlight.sh
        ```
        
        If you have to stop it, see the CONTAINER ID, and then do it
        ```sh
        sudo docker container ls
        sudo docker stop CONTAINER_ID
        ```
        test it
        > curl http://localhost:2222/rest/annotate   -H "Accept: application/json"   --data-urlencode "text=Brazilian state-run giant oil company Petrobras signed a three-year technology and research cooperation agreement with oil service provider Halliburton."   --data "confidence=0.3"   --data "support=20"
        
        **To install this package, just run:**
        ```sh
        pip3 install -i https://test.pypi.org/simple/ wikitablewrapper
        ```
        
        
        # How use it?
        
        
        ```python
        wt = WikitableWrapper(20)
        wt.createHtmlFile = True
        
        wt.includeBabelfy = True
        wt.includeTagme = True
        wt.includeFremeNer = True
        wt.includeDBpediaSpotlightLocal = True
        
        # you can do, either
        wt.outputFolder="1Out"  # Optional
        wt.processJson("1Tablas/1003231_2.json")
        
        # or
        wt.ProcessFolderOfJson("100Tablas","100Out")
        ```
        
        See below an example of how use the Benchamrk class
        
        ```python
        wb = WikitableBenchmark()
        dSys = {"Babelfy":"_babelfy", "TagME":"_tagme", "FremeNER":"_fremener", "DBpedia Spotlight":"_dbpst"}
        wb.MeasureF1_and_Summarize("100Tablas","100Out", dSys, "100Benchmark")
        ```
        
Keywords: NIF parser table NLP
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4
Description-Content-Type: text/markdown
Provides-Extra: test
Provides-Extra: dev
