Skip to content

Commit

Permalink
Merge branch 'kf/visualizer' of github.com:centre-for-humanities-comp…
Browse files Browse the repository at this point in the history
…uting/conspiracies into kf/visualizer
  • Loading branch information
KasperFyhn committed May 23, 2024
2 parents db14f8a + f643afa commit aa3eb7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion paper/src/context_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def range_of_dates(start_date, extra_days):
# write contests to ndjson
with open(
os.path.join(
f"tweet_threads_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date() }_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date() + datetime.timedelta(days=args.extra_days-1)}.ndjson",
f"tweet_threads_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date()}_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date() + datetime.timedelta(days=args.extra_days-1)}.ndjson",
),
"w",
) as f:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

from spacy.tokens import Doc

from conspiracies.docprocessing.relationextraction.gptprompting.prompt_templates import PromptTemplate
from conspiracies.docprocessing.relationextraction.gptprompting.prompt_templates import (
PromptTemplate,
)
from conspiracies.registry import registry


Expand Down
2 changes: 1 addition & 1 deletion src/conspiracies/preprocessing/create_context_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def range_of_dates(start_date, extra_days):
# write contests to ndjson; the ndjson of contexts has the format: List[Dict[str, Any]]
with open(
os.path.join(
f"tweet_threads_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date() }_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date() + datetime.timedelta(days=args.extra_days-1)}.ndjson",
f"tweet_threads_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date()}_{datetime.datetime.strptime(args.start_date, '%Y-%m-%d').date() + datetime.timedelta(days=args.extra_days-1)}.ndjson",
),
"w",
) as f:
Expand Down

0 comments on commit aa3eb7c

Please sign in to comment.