GithubHelp home page GithubHelp logo

rmjacobson / privacy-crawler-parser-tokenizer Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.3 MB

Crawler, Parser, Sentence Tokenizer for online privacy policies. Intended to support ML efforts on policy language and verification.

License: MIT License

Python 1.90% HTML 98.09% Shell 0.01%
privacy-policy html-parser sentence-tokenizer web-crawler web-crawler-python

privacy-crawler-parser-tokenizer's Introduction

CMU INI MSIS Master's Project: Automated Privacy Policy Sentence Tokenization

Running the Project

Please read the Virtual Environments section before trying to run this project to save headaches.

The top-level scripts for this project's main components (crawler.py and parser-tokenizer.py) can be run very simply, as shown in the two examples below. There are also bash scripts containing these examples that can be executed from this top-level directory.

python src/crawler.py -n 5 data/inputs/alexa_top_10K.json data/inputs/ground_truth_html/ data/inputs/dictionary.txt 0.6 3 data/crawler_output/html/ data/crawler_output/stripped_text/

python src/parser-tokenizer.py data/crawler_output/html/ data/crawler_output/stripped_text/ data/inputs/rules.json data/parser_output/ data/tokenizer_output/

However, due to the limitations of Python's module importing rules, some of the associated submodules must be run from inside the src directory with the commands shown below. Please read each module's README.md for more information.

python -m verification.verify 0.6 ../data/inputs/ground_truth_html/ ../data/inputs/dictionary.txt ../data/crawler_output/html/

Virtual Environments

To set up your virtual environment, refer to this documentation.

To download all dependencies:

$ pip3 install -r requirements.txt

If you've downloaded any additional libraries, log those libraries to your requirements.txt file by running the following:

$ pip freeze -l > requirements.txt

Environment Notes

MacOS Catilina (10.15) and above have limited the user's default ability to multithread. If running these versions of the OS, need to add the following line to ~/.bash_profile and reload the shell.

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Source: https://stackoverflow.com/a/52230415

If you are on macOS, you may need to allow Python unlimited access through the firewall.

privacy-crawler-parser-tokenizer's People

Contributors

rmjacobson avatar thomasvn avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

excloudx6

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.