Jan Philip Wahle commited on
Commit
aa3742a
1 Parent(s): 8e8b967

Add more paraphrase types

Browse files
Files changed (1) hide show
  1. app.py +30 -1
app.py CHANGED
@@ -21,6 +21,35 @@ def create_prompt(sentence, paraphrase_type):
21
  }
22
  return prompt
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  with gr.Blocks() as demo:
25
  description = gr.Markdown("""
26
  ## Paraphrase Type Generator
@@ -34,7 +63,7 @@ with gr.Blocks() as demo:
34
  """)
35
  chatbot = gr.Chatbot()
36
  types = gr.Dropdown(
37
- ["Morphology-based changes", "Lexico-syntactic based changes", "Lexicon-based changes", "Syntax-based changes", "Discourse-based changes"],
38
  value="Syntax-based changes",
39
  multiselect=True,
40
  allow_custom_value=True,
 
21
  }
22
  return prompt
23
 
24
+ paraphrase_types = [
25
+ "Derivational Changes",
26
+ "Inflectional Changes",
27
+ "Modal Verb Changes",
28
+ "Spelling changes",
29
+ "Change of format",
30
+ "Same Polarity Substitution (contextual)",
31
+ "Same Polarity Substitution (habitual)",
32
+ "Same Polarity Substitution (named ent.)",
33
+ "Converse substitution",
34
+ "Opposite polarity substitution (contextual)",
35
+ "Opposite polarity substitution (habitual)",
36
+ "Synthetic/analytic substitution",
37
+ "Coordination changes",
38
+ "Diathesis alternation",
39
+ "Ellipsis",
40
+ "Negation switching",
41
+ "Subordination and nesting changes",
42
+ "Direct/indirect style alternations",
43
+ "Punctuation changes",
44
+ "Syntax/discourse structure changes",
45
+ "Entailment",
46
+ "Identity",
47
+ "Non-paraphrase",
48
+ "Addition/Deletion",
49
+ "Change of order",
50
+ "Semantic-based"
51
+ ]
52
+
53
  with gr.Blocks() as demo:
54
  description = gr.Markdown("""
55
  ## Paraphrase Type Generator
 
63
  """)
64
  chatbot = gr.Chatbot()
65
  types = gr.Dropdown(
66
+ paraphrase_types,
67
  value="Syntax-based changes",
68
  multiselect=True,
69
  allow_custom_value=True,