GithubHelp home page GithubHelp logo

tobi2k / statistics-extraction Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 1.0 14.55 MB

A project for regular expression inclusion and statistics extraction from scientific papers.

License: MIT License

Python 13.22% HTML 0.84% Jupyter Notebook 85.94%
regular-expression regular-expression-to-nfa statistics active-wrapper regular-expression-inclusion statistics-extraction

statistics-extraction's Introduction

Reducing a Set of Regular Expressions and Analyzing Differences of Domain-specific Statistic Reporting


This repository provides the code for the paper 'On the Rule-Based Extraction of Statistics Reported in Scientific Papers' published in NLDB 2023. An extended arXiv version is available here.

This paper is an extension of STEREO (Code), which was published in iiWAS2021. STEREO is a statistics extraction tool, that uses regular expressions to extract statistics from scientific papers.

We provide code for finding a minimal set of regular expressions. In our case, we apply this minimal set algorithm to the set of regular expressions used in STEREO to extract statistics. STEREO was previously trained on papers from the life sciences and medical domain. We extend STEREO to a new domain, namely Human-Computer-Interaction. Here, we learn new rules and expand STEREO to be able to use PDF and LaTeX files as input, instead of only JSON files.

Getting Started

For the correct functionality, we recommend using Python 3.8. You can create a new virtual environment or use your global one. Install the requirements by running:

pip install -r requirements.txt

For the use of the interactive GUI for ActiveWrapper learning you need to install tkinter. For more information see here. Also, the package pdftotext is required for parsing PDF files. Follow the installation instructions here to ensure the correct functionality.

Additionally, you should download the CORD-19 and arXiv datasets and place them in the folders Cord-19 and arXiv-papers respectively. For the arXiv papers, we recommend using a crawler, to crawl papers by URL, for example by adapting the 2Like crawler we used. The folder paper-gathering contains a notebook to generate a file containing arXiv URLs filtered by arXiv tag from the metadata list.

For more information see the technical report.

File structure

See the READMEs in the sub-folders for more information on the respective features.

.
├── arXiv-papers                # Contains the arXiv papers ...
│   ├── pdf                     # ... as PDF
│   └── tex                     # ... as LaTeX
├── Cord-19                     # Contains the CORD-19 papers.
│   └── document_parses
│       └── pdf_json            # This folder should contain a lot of .json files
├── inclusion-stats             # Contains a notebook that generates some plots for our inclusion algorithm.
├── paper-gathering             # Contains a notebook that filters papers by arXiv tag and generates a list of URLs.
├── regex-inclusion             # Contains the code for our regular expression inclusion algorithm
├── STEREO                      # Contains some general files for STEREO
│   └── Code                    # Contains the code for our extended STEREO implementation
├── testing-playground          # Contains some unfinished tests, not that important
└── Technical_Report.pdf        # Describes this project in more detail

License

MIT License

Copyright (c) 2022 Tobias Kalmbach

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

statistics-extraction's People

Contributors

tobi2k avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

emiel89

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.