Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotator analysis #20

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions utils/analyze_jsonl.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import csv

#file_path = "entity_checkin_one_download.49863984-3905-4e3d-a059-4b2ef0004267.jsonl"
file_name = "entity_checkin_one_download.850cb48f-8027-4380-a497-fc0f31e64f48"
#file_name = "entity_checkin_one_download.850cb48f-8027-4380-a497-fc0f31e64f48"
file_name = "database_download/main_3_per_cluster_download.66081fcf-3ef5-48ea-97e0-49298d29b477"
file_path = file_name + ".jsonl"

data = srsly.read_jsonl(file_path)
Expand Down Expand Up @@ -83,28 +84,28 @@
else: throw("NO 'text' field encountered! This field is necessary for the rest of the script to work! Please fix this and then run this script.")


if "original_text" in entry:
original_text = entry["orig_text"]
if "original_md_text" in entry:
original_text = entry["original_md_text"]
else:
original_text = "None because no text modifications made. See 'text' field for the original text."


if "source" in entry:
source = entry["source"]
if "url" in entry:
source = entry["url"]
else:
source = "source missing!"
source = "url missing!"


if "document_id" in entry:
document_id = entry["document_id"]
if "document_index" in entry:
document_id = entry["document_index"]
else:
document_id = "document id missing!"
document_id = "document index missing!"


if "sentence_id" in entry:
sentence_id = entry["sentence_id"]
if "md_sentence_index" in entry:
sentence_id = entry["md_sentence_index"]
else:
sentence_id = "sentence id missing!"
sentence_id = "md_sentence_index missing!"

if "_session_id" in entry:
username = entry["_session_id"]
Expand Down
Loading