Coder Social home page Coder Social logo

harvester's Introduction

**Data Extraction and NLP

Setup


Install Python Virtual Environment


Open a terminal in this directory

Run the following command to install virtual environment

python -m venv VirtualEnv

Activate the environment before proceeding to next step

VirtualEnv\Scripts\activate

Install dependencies


In terminal, run command

pip install -r requirements.txt

Running the code


First Run


For first time users, uncomment the spider code in main.py

This process will take time, hence the files are already extracted and saved.

NOTE:: Run these command to extract data using spider

import subprocess

project_path="dataExtraction"

subprocess.Popen(["scrapy","crawl","harvester","-o","harvestedfiles.json"],shell=True, cwd=project_path)

OR

In terminal run commands

 cd dataExtraction

 scrapy crawl harvester -o harvestedfiles.json

 cd ..

Normal Run


Run the following command:

python main.py

About


As per the instructions in Objective.docx, the data extraction is done from the urls in Input.xlsx using Scrapy library in Python

The code is dynamic and will handle errors like bad_url and any new url in Input.xlsx will get handled by first run commands.

Please note that running spider will take about 5 mins to complete and is not advised to use

Text Analysis is done using both given stopwords and nltk provided stopwords

Sentiment analysis is performed from given stopwords as provided

While the readability analysis is done from raw text as per need

All the code uses python only.

You can view the anaylsis in Output Data Structure.xlsx


Additional Support

.json file is also created for data that has been extracted from urls

Directory StopWords and Input.xlsx are dynamically binded to support any new files and links respectively

Spider also has a pipeline interface to store data into a database


Contact

Name: Lakshay Sharma

Phone: 7011829824


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.