diff --git a/src/main.py b/src/main.py index 5f9429e8fd02d5b30ed32f0feeff3c1665db7295..05a841acf01adf810822c06ee519de79d51c2a6b 100644 --- a/src/main.py +++ b/src/main.py @@ -26,6 +26,9 @@ parser.add_argument('-verbose',choices=[0,1,2],type=int,default=0, parser.add_argument('-prune_text_nodes_min_freq',type=int,default=2, help='how often a text description node has to occur to be included in the graph') + +parser.add_argument('--subcategories',dest='subcat',action='store_true', + help='do we want subcategories (e.g. category punishment: corporal, subcategory: whipping), there will be many more nodes with subcat enabled') args = parser.parse_args() @@ -42,7 +45,7 @@ def write(path,G): f.write(json.dumps(nx.readwrite.json_graph.node_link_data(G))) -G,index_dict = gb.build_graph(years=args.year) +G,index_dict = gb.build_graph(years=args.year,subcat=args.subcat) print("Graph info before text description node simplification:") print(nx.info(G)) gh.simplify_text_description_nodes(G,index_dict,mode=args.text_node_simplification_mode,min_freq=args.prune_text_nodes_min_freq)