Programming > SOLUTIONS MANUAL > University of the PeopleCS 3308: I CS 3308CS3308 Data Retrieval assignment 4-REVIEWED AND EDITED BY (All)
Code import sys,os,re import math import sqlite3 import time PYTHONIOENCODING="UTF-8" scriptpath = "C:/Users/xhenr/Documents/cs3308/Week 4/posterStemmer.py" sys.path.append(os.path.abspath(scri... ptpath)) import posterStemmer #from porterstemmer import PorterStemmer # clear python screen os.system('cls') # the database is a simple dictionnary database = {} # regular expression for: extract words, extract ID from path, check for hexa value chars = re.compile(r'\W+') pattid= re.compile(r'(\d{3})/(\d{3})/(\d{3})') # the higher ID tokens = 0 documents = 0 terms = 0 # # We will create a term object for each unique instance of a term # class Term(): termid = 0 termfreq = 0 docs = 0 docids = {} # split on any chars def splitchars(line) : return chars.split(line) [Show More]
Last updated: 2 years ago
Preview 1 out of 7 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
May 07, 2021
Number of pages
7
Written in
This document has been written for:
Uploaded
May 07, 2021
Downloads
0
Views
112
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·