Skip to content
Snippets Groups Projects
Commit 2bb0c04b authored by opitz's avatar opitz
Browse files

small bugfix and new argument : subcat - use subcategories instead of categories

parent 9a0c54b5
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
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