oer commons search engineyutarochan.github.io/assets/pdf/ist 441_ oer commons search engi… ·...

21
OER Commons Search Engine IST 441: Specialty Search Engine Project Final Report Nick D., Wyatt N., Yuya O., and Dana S. Group 8

Upload: others

Post on 04-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

OER Commons Search EngineIST 441: Specialty Search Engine Project Final Report

Nick D., Wyatt N., Yuya O., and Dana S.Group 8

Page 2: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Outline1. Introduction

2. System Architecture

3. Crawler System

4. Document Preprocessing

5. Indexing Methods

6. Front-End Interface

7. Results

8. Conclusion

Page 3: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

- MOOCs (Massively Online Open Courses) and other open-source and free educational content has recently dominated the internet.

- This has also led to the curation of free content that are now available for online learners to access.

- OER Commons (Open Educational Resources) is a open-source and community driven effort to curate free resources in accessible manner.

However, a useful speciality search engine for OER Commons content does not yet exist...

Introduction

Page 4: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Customer Information

- Professor Fusco from the College of IST

- Background in Enterprise System Architecture

- Expressed interest in having an OER Search Engine because he believed that “this would be very powerful to implement within a classroom setting.”

Page 5: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

System Architecture

SEARCH INTERFACE

FRONT-ENDINTERFACE

REST APIENDPOINT

CRAWLER SYSTEM

SEED SITESCRAPER

HTTRACKCRAWLER

SEED URLJSON

RAW DATA

Note: We wrote (almost) everything from scratch!

DATA PREPROCESSING ENGINE

CONTENT INDEXER

RAW DATATEXT EXTRACTION

CONTENT METADATA

RAW TEXT DATA

CONTENT DEDUPLICATION

SYSTEM

TEXT PREPROCESSING

ENGINE

DOCUMENT EMBEDDINGS LDA TF-IDF BAG-OF-WORDS

FEATURE ENSEMBLING ENGINE

Page 6: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Seed Crawler SystemObjective: Obtain list of materials and site content posted on OER Commons Resource.

Discovered blank query leads to display of entire OER Commons Resource content.

Plan: Using Python’s Requests and BeautifulSoup library, we scrape URLs and corresponding metadata from the OER Commons search page.

OER Query URL Structurehttps://www.oercommons.org/browse?batch_size=50&batch_start=50

Base URL Results Per Page Start Index

Page 7: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Seed Crawl Statistics

Total Seed URL: 50092

Scheme Distribution- HTTP: 35292- HTTPS: 14800

Top 5 URL Domains1. org - 269032. edu - 100323. com - 49874. gov - 48055. ie - 703

Top 10 Domain Freq1. cnx - 35822. geogebratube - 35173. loc - 31524. animaldiversity - 26235. youtube - 22166. carleton - 21447. mit - 19818. teachengineering - 16309. ck12 - 1625

10. archive - 1416

Page 8: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

HTTracker Site CrawlerObjective: Download seed site and subsequent link documents - up to two URL levels deep and build a raw data repository that we can analyze and index.

- HTTracker is an open-sourced site-mirroring utility used for site archival system.

- HTTracker is easy to use and highly configurable.

- Parallelization is not so easy, so we wrote our own multi-process orchestrator to run multiple instances of HTTracker per seed url.

HTTracker Process Orchestrator

HTT_1 HTT_2 HTT_N...HTT_3

URL_1 URL_2 URL_3 URL_N

RAW DATA

SEED URLJSON

Page 9: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Document PreprocessingRaw Data Content Extraction Process

Objective: Extract raw text and generate document metadata for each raw data crawled.

For this, we implemented the following Raw Data Content Extraction pipeline:

RAW DATA

CONTENT METADATA

CONTENT FILE TYPE ANALYZER

METADATAGENERATOR

RAW TEXT FILE(i.e. TXT)

PPTX, PPT, DOCX, DOC, XLS, XLSX, RTF

NATIVE PYTHON I/OBUILT-IN FUNCTION

HTML, HTM, PHP, ASP, JSP

TEXTRACT

BOILERPIPE

RAW TEXT DATA

PDF GHOSTSCRIPT

NOT CONSIDERED

NOT CONSIDERED

Page 10: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Document PreprocessingMetadata GeneratorFor each website, the following metadata are generated:

UUID: Unique document identifier which will be used to normalize naming convention of files.

URL: Original URL of the website scraped.

Title: Website title, based on the title tag (if exist, else use the URL as the title).

All metadata is stored as a json file which will be used in the final web server for quickly mapping the result UUID to the corresponding content.

Page 11: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Document PreprocessingBoilerpipe Content ExtractionBoilerpipe is a specialized library designed to remove “irrelevant” clutter content.

This package has been shown to work really well in removing things such as navigation bars, headers, footers, and anything that is not really related to the primary content of the site - hence improving overall retrieval performance.

Paper: http://www.l3s.de/~kohlschuetter/boilerplate/

Using Boilerpipe, we filter out any sites that have a ratio based on the following heuristic:

0.1 < Boilerpipe Processed Character Count / Total Document Character Count

Page 12: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Raw Data Content DeduplicationProblem Description

Since we ran a single HTTrack instance per seed site, there may be potential content redundancies we must consider.

Objective: Develop a deduplication routine to consolidate the raw data hierarchy into a single unified tree structure such that no page duplicates exists.

Example:

DOM 1 DOM 2

SEED A

1A1B

1C 2A 2B

DOM 3 DOM 2

SEED B

3A3B

3C 2B 2C

ROOT

DOM 1

DOM 2

DOM 3

1A1B

1C

2A2B

2C

3A3B

3C

Page 13: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Raw Data Content DeduplicationAlgorithm Strategy

To deduplicate (or merge) the individual file tree structure into a single unified tree data structure, we implemented the following algorithm:

1. Serialize the directory tree into a single list representation.

2. Merge the lists together with a hashmap.

3. Deserialize the final merged list and construct unified tree file structure.

Reduction Results:

Total Scraped: 397,848 pages Pre-Redupe Website Count: 307236 pages

Post-Processed Website Count: 109,650 pages

Page 14: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Document PreprocessingNLP Preprocessing RoutinesIn our preprocessing routine, we have implemented the following pipeline:

TOKENIZATION NORMALIZATION(LOWER CASING)

STOP WORD REMOVAL

RAW TEXT DATA

NLTK Tokenizer Lower Function Custom Function

Page 15: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Document VectorizationDocument Embeddings (Doc2Vec)

- Method proposed by Le et. al to convert variable documents or lengths of text into a single vector representation.

- Utilizes a distributed memory model (neural networks) similar to word embeddings (Word2Vec).

- Utilized Gensim to construct the document embeddings.

Training Process (Hyperparameters):- Method: Skip-Gram Variant- Vector Dimension: 1024- Training Epochs: 500- Window Size: 8- Minimum Word Count: 5- Learning Rate (alpha): 0.001

Page 16: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Front-End Interface

Page 17: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Live Demonstrationhttp://17ede145.ngrok.io

Page 18: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Empirical Observations & Improvements

- Performs fairly well on general subject terms (i.e. biology, physics, math, etc…)

- Only is able to return relevant results based on what OER Commons has, and nothing else.

- Lots of pages have “Page Has Moved”, 404 Redirects - need to better improve our crawler

settings to filter out pages that do not lead anywhere.

- Better error handling should be made for weird queries that come into our system.

Page 19: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Comments from Customer

Further comments from our customer will be provided in the final report.

This will include customer remarks on the overall evaluation of the search engine and the “relative” performance to his expectations.

Page 20: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

ConclusionIn this project we have presented:

- Our motivation for building a specialized search engine for OER Commons.

- System architecture and design choices for the Search Engine

- The data processing pipeline and corresponding components.

- Live demonstration of our search engine.

Page 21: OER Commons Search Engineyutarochan.github.io/assets/pdf/IST 441_ OER Commons Search Engi… · Plan: Using Python’s Requests and BeautifulSoup library, ... site-mirroring utility

Source CodeThe source code for the entire pipeline is available on our Github repository.

https://github.com/yutarochan/IST441