Skip to content
Snippets Groups Projects
Commit 842532ae authored by Sandra Friebolin's avatar Sandra Friebolin
Browse files

Update inference

parent 655d7e11
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ def find_target_position(split_sentence, split_target):
pos = find_target_position(split_sentence, split_target)
target_json = json.loads(pos)
#target_json = json.loads(pos)
print(f"The target word is {target_word} and at the position {pos}.")
print("Now enter the label: 0 for literal, 1 for non-literal")
......@@ -55,7 +55,7 @@ label = int(input())
# Convert to data sample for BERT
data_sample = [{"sentence": sentence, "pos": target_json, "label": label}]
data_sample = [{"sentence": sentence, "pos": pos, "label": label}]
print(data_sample)
tokenizer=AutoTokenizer.from_pretrained("bert-base-uncased")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment