Skip to content

Commit

Permalink
add analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
supercoderhawk committed Jan 9, 2020
1 parent 5c6905d commit 2dfc35b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions wsdm_digg/analyzer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: UTF-8 -*-
24 changes: 24 additions & 0 deletions wsdm_digg/analyzer/data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: UTF-8 -*-
from pysenal import read_jsonline_lazy
from wsdm_digg.constants import *
from wsdm_digg.elasticsearch.data import get_paper


class DataViewer(object):
def __init__(self):
pass

def view(self):
for idx, item in enumerate(read_jsonline_lazy(DATA_DIR + 'test.jsonl')):
if idx > 20:
break
paper = get_paper(item['paper_id'])
print('============')
print(item['description_text'])
print('-------------')
print(paper['title'])
print(paper['abstract'])


if __name__ == '__main__':
DataViewer().view()
4 changes: 4 additions & 0 deletions wsdm_digg/analyzer/search_result.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: UTF-8 -*-
class SearchResultAnalyzer(object):
def __init__(self):
pass

0 comments on commit 2dfc35b

Please sign in to comment.