Skip to content
Snippets Groups Projects
Commit 32c9f1bb authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Added maximum context size option.

parent adab1974
No related branches found
No related tags found
No related merge requests found
......@@ -206,6 +206,7 @@ def process_file(context_list: list, target_string: str,
stopword_list = config.stop_words
allowed_tag_list = config.allowed_tags
min_context_size = config.min_context_size
max_context_size = config.max_context_size
try:
......@@ -241,7 +242,7 @@ def process_file(context_list: list, target_string: str,
context_size = len(token_set)
if context_size >= min_context_size:
if context_size >= min_context_size and context_size <= max_context_size:
for token in token_set:
if token in node_freq_dict:
......
......@@ -41,6 +41,7 @@ max_edges = 2000000
Choose the minimum context size.
'''
min_context_size = 4
max_context_size = 20
'''
Choose filters for building the graph.
......
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