Commit 32c9f1bb authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Added maximum context size option.

parent adab1974
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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:
+1 −0
Original line number Diff line number Diff line
@@ -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.