created new tf-idf and changed posting class
This commit is contained in:
parent
a736e05d00
commit
a567424a54
11
posting.py
11
posting.py
@ -1,10 +1,9 @@
|
|||||||
#Posting class for indexer, will probably be more complex as we keep adding crap to it
|
#Posting class for indexer, will probably be more complex as we keep adding crap to it
|
||||||
|
|
||||||
class Posting():
|
class Posting():
|
||||||
def __init__(self,url,tf_idf):
|
def __init__(self, url, rtf, position):
|
||||||
self.url = url
|
self.url = url
|
||||||
self.tf_idf = tf_idf
|
self.rtf = rtf
|
||||||
|
self.tf = 0
|
||||||
def comparator(self):
|
self.tfidf = 0
|
||||||
#Some custom comparator for sorting postings later
|
self.positions = [position]
|
||||||
pass
|
|
Loading…
Reference in New Issue
Block a user