Skip to content

Commit

Permalink
adapt window
Browse files Browse the repository at this point in the history
  • Loading branch information
markus583 committed Apr 27, 2024
1 parent 3b066b3 commit 2214fac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wtpsplit/evaluation/intrinsic.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Args:
keep_logits: bool = False
skip_adaptation: bool = False
skip_corrupted: bool = False
zh_window: int = 10
zh_window: int = 0
clf_from_scratch: bool = False


Expand All @@ -71,6 +71,8 @@ class Args:


def preprocess_zh_sentence(text, n=10):
if n == 0:
return text
result = []
length = len(text)
i = 0
Expand Down Expand Up @@ -309,6 +311,8 @@ def main(args):
save_str += f"{args.save_suffix}"
if args.max_n_test_sentences < sys.maxsize:
save_str += f"_n{args.max_n_test_sentences}"
if args.zh_window > 0:
save_str += f"_zh{args.zh_window}"

# first, logits for everything.
f, total_test_time = load_or_compute_logits(args, model, eval_data, valid_data, save_str)
Expand Down

0 comments on commit 2214fac

Please sign in to comment.