diff --git a/src/absinth.py b/src/absinth.py
index d6d22ae0e0e731131270b1a239e7805141ac0f35..5c164253edf2d943bf8e3300e0e3ab415f37a2ab 100644
--- a/src/absinth.py
+++ b/src/absinth.py
@@ -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:
diff --git a/src/config.py b/src/config.py
index 01a0a9e25ec62222ea67b6fe9598ec115299b6ae..a8235037d2ae1ff2f0d769292910c547654dadbb 100644
--- a/src/config.py
+++ b/src/config.py
@@ -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.