Implement python code to generate term-docid pairs for a small startup project.
Budget: $10 – $30 CAD
I am looking for a freelancer who can help implement python code for my small startup project. The project involves generating term-docid pairs for a dataset of less than 1000 documents.
Skills and experience required for this job include:
- Intermediate level python coding expertise
- Knowledge of working with small datasets
- Ability to generate term-docid pairs efficiently
The code does not need to be extensively commented for future reference.
Sub Project 1:
Use reuters, the module that while there are still more documents to be processed, accepts a document as a list of tokens (omit punctuation) and outputs term-docID pairs.
Instead of appending new term-docID pairings to a list, make sure you directly append the docID to the postings list for the term. You may use a hash table. No boxes required.
(a) compare timing of this SPIMI inspired procedure with the naive indexer (for 10000 term-docID pairings).
(b) compile an inverted index for Reuters21578 without using any compression techniques docID hint: Use the NEWID values from the Reuters corpus to make your retrieval comparable.
Subproject II:
Convert your indexer into a probabilistic search engine
1. using the assumptions made about independence of terms and documents etc. and
2. using the BM25 formula
3. rank the documents your index returns and
4. for a given query, return a ranked list of results.
Notes: experiment with different values for the parameters k1 and b.
Test queries: 1. design four test queries:
(a) a single keyword query. Compare results for the same queries of Subproject I with the results for your Nave indexer
(b) a multiple keyword query for Subproject I returning documents containing all the keywords (AND) for unranked retrieval
(c) a multiple keywords query returning documents containing at least one keyword (OR), where documents are ordered by how many keywords they contain)
(d) a query consisting of several keywords for ranking with BM25 2. run your four test queries to showcase your code and comment on the results in your report
Deliverables: well documented sample runs for your queries on the information needs: (a) Democrats’ welfare and healthcare reform policies (b) Drug company bankruptcies (c) George Bush 4. any additional testing or aborted design ideas that show off particular aspects of your project.
Skills and experience required for this job include:
- Intermediate level python coding expertise
- Knowledge of working with small datasets
- Ability to generate term-docid pairs efficiently
The code does not need to be extensively commented for future reference.
Sub Project 1:
Use reuters, the module that while there are still more documents to be processed, accepts a document as a list of tokens (omit punctuation) and outputs term-docID pairs.
Instead of appending new term-docID pairings to a list, make sure you directly append the docID to the postings list for the term. You may use a hash table. No boxes required.
(a) compare timing of this SPIMI inspired procedure with the naive indexer (for 10000 term-docID pairings).
(b) compile an inverted index for Reuters21578 without using any compression techniques docID hint: Use the NEWID values from the Reuters corpus to make your retrieval comparable.
Subproject II:
Convert your indexer into a probabilistic search engine
1. using the assumptions made about independence of terms and documents etc. and
2. using the BM25 formula
3. rank the documents your index returns and
4. for a given query, return a ranked list of results.
Notes: experiment with different values for the parameters k1 and b.
Test queries: 1. design four test queries:
(a) a single keyword query. Compare results for the same queries of Subproject I with the results for your Nave indexer
(b) a multiple keyword query for Subproject I returning documents containing all the keywords (AND) for unranked retrieval
(c) a multiple keywords query returning documents containing at least one keyword (OR), where documents are ordered by how many keywords they contain)
(d) a query consisting of several keywords for ranking with BM25 2. run your four test queries to showcase your code and comment on the results in your report
Deliverables: well documented sample runs for your queries on the information needs: (a) Democrats’ welfare and healthcare reform policies (b) Drug company bankruptcies (c) George Bush 4. any additional testing or aborted design ideas that show off particular aspects of your project.