-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdblplib.py
70 lines (57 loc) · 2.29 KB
/
dblplib.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import urllib.request
import locale
import codecs
import sys
import json
def printLocationDBLP(paper):
last = ""
if 'pages' in paper:
last = ":"
print(paper['venue'], end=" ")
if 'volume' not in paper:
print(paper['year'], end=last)
else:
print(paper['volume'], end=last)
if 'pages' in paper:
print(" " + paper['pages'], end="")
if 'volume' in paper:
print(" (" + paper['year'] + ")",end="")
def printLocationShort(paper):
if paper['venue'] == 'CoRR':
print("arXiv", end=" ")
else:
print(paper['venue'], end=" ")
if 'volume' not in paper:
print(paper['year'], end="")
else:
print("(" + paper['year'] + ")",end="")
def lookahead(iterable):
"""Pass through all values from the given iterable, augmented by the
information if there are more values to come after the current one
(True), or if it is the last value (False).
"""
# Get an iterator and pull the first value.
it = iter(iterable)
last = next(it)
# Run the iterator to exhaustion (starting from the second value).
for val in it:
# Report the *previous* value (more to come).
yield last, True
last = val
# Report the last value.
yield last, False
def getMyTitleKey(title):
title = title.lower()
#print(title)
#print("<br>")
if title == 'the computational complexity of finding separators in temporal graphs.':
return "the complexity of finding small separators in temporal graphs."
if title == 'facility location under matroid constraints - fixed-parameter algorithms and applications.':
return "fixed-parameter algorithms for maximum-profit facility location under matroid constraints."
#if title == 'multistage s-t path - confronting similarity with dissimilarity.':
# return "multistage s-t path - confronting similarity with dissimilarity in temporal graphs."
if title == 'multistage s-t path - confronting similarity with dissimilarity in temporal graphs.':
return "multistage s-t path - confronting similarity with dissimilarity."
if title == 'the computational complexity of finding temporal paths under waiting time constraints.':
return "finding temporal paths under waiting time constraints."
return title