-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c6905d
commit 2dfc35b
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# -*- coding: UTF-8 -*- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: UTF-8 -*- | ||
class SearchResultAnalyzer(object): | ||
def __init__(self): | ||
pass |