Frederick commited on
Commit
2f49d5f
·
1 Parent(s): e59e6f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -145,9 +145,9 @@ def label_visualization(clause2labels):
145
  aspect_labels.append(aspect_label)
146
  genericity_labels.append(genericity_label)
147
  boundedness_labels.append(boundedness_label)
148
- aspect_dict = {"Dynamic": aspect_labels.count("dynamic"), "Stative": aspect_labels.count("stative")}
149
- genericity_dict = {"Generic": genericity_labels.count("generic"), "Specific": genericity_labels.count("specific")}
150
- boundedness_dict = {"Static": boundedness_labels.count("static"), "Episodic": boundedness_labels.count("episodic"), "Habitual": aspect_labels.count("habitual")}
151
  print(aspect_dict, genericity_dict, boundedness_dict)
152
  fig, axs = plt.subplots(1, 3, figsize=(10, 6,))
153
  axs[0].pie([float(v / total_clauses) for v in aspect_dict.values()], colors = sns.color_palette('pastel')[0:3], labels=aspect_dict.keys(), autopct='%.0f%%', normalize=True )
 
145
  aspect_labels.append(aspect_label)
146
  genericity_labels.append(genericity_label)
147
  boundedness_labels.append(boundedness_label)
148
+ aspect_dict = {"Dynamic": aspect_labels.count("dynamic"), "Stative": aspect_labels.count("stative"), "NA": aspect_labels.count("NA")}
149
+ genericity_dict = {"Generic": genericity_labels.count("generic"), "Specific": genericity_labels.count("specific"), "NA": genericity_labels.count("NA")}
150
+ boundedness_dict = {"Static": boundedness_labels.count("static"), "Episodic": boundedness_labels.count("episodic"), "Habitual": boundedness_labels.count("habitual"), "NA": boundedness_labels.count("NA")}
151
  print(aspect_dict, genericity_dict, boundedness_dict)
152
  fig, axs = plt.subplots(1, 3, figsize=(10, 6,))
153
  axs[0].pie([float(v / total_clauses) for v in aspect_dict.values()], colors = sns.color_palette('pastel')[0:3], labels=aspect_dict.keys(), autopct='%.0f%%', normalize=True )