Skip to content

Commit

Permalink
citation count by id script: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhb committed Dec 12, 2023
1 parent f344368 commit 53db22a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/citation_count_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from tqdm import tqdm
import re

csv.field_size_limit(sys.maxsize)

def re_get_ids(val, identifiers, multi_ids = False, group_ids= False):
res = []
items = [val]
Expand Down Expand Up @@ -34,6 +36,7 @@ def get_omid_map(fzip, wanted_id):
print("Total number of files in the archive is:"+str(len(archive.namelist())))
for csv_name in tqdm(archive.namelist()):
with archive.open(csv_name) as csv_file:

l_cits = list(csv.DictReader(io.TextIOWrapper(csv_file)))
for o_row in l_cits:
omid_ids = re_get_ids(o_row["id"],["omid"])
Expand Down

0 comments on commit 53db22a

Please sign in to comment.