ashokpoudel commited on
Commit
a10f12f
·
1 Parent(s): edfd769
Files changed (1) hide show
  1. SynonymEditor.py +2 -2
SynonymEditor.py CHANGED
@@ -13,7 +13,7 @@ class SynonymEditor:
13
  self.max_tokens = max_tokens
14
  self.temperature = temperature
15
  self.language = language
16
- self.quote = '__NIE__' if (language == 'de') else '__QUOTE__'
17
 
18
  # Play with the prompts here and change the return index to change and see the effect of the prompt on the output quality
19
  # Note that the longer the prompt, higher the token used and hence the billing
@@ -25,7 +25,7 @@ class SynonymEditor:
25
  else:
26
  prompt = "Replace exactly one word with a synonym while preserving the overall sentence structure and meaning.\n" + \
27
  few_shots + "\nInput:" + sentence + " Output:"
28
- elif "__QUOTE__" in sentence:
29
  if (self.language == "de"):
30
  prompt = 'Modernisiere den deutschen Text. Fasse direkte Reden NIE zusammen.\n'+sentence+'\n'
31
  else:
 
13
  self.max_tokens = max_tokens
14
  self.temperature = temperature
15
  self.language = language
16
+ self.quote = '__ZITIEREN__' if (language == 'de') else '__QUOTE__'
17
 
18
  # Play with the prompts here and change the return index to change and see the effect of the prompt on the output quality
19
  # Note that the longer the prompt, higher the token used and hence the billing
 
25
  else:
26
  prompt = "Replace exactly one word with a synonym while preserving the overall sentence structure and meaning.\n" + \
27
  few_shots + "\nInput:" + sentence + " Output:"
28
+ elif self.quote in sentence:
29
  if (self.language == "de"):
30
  prompt = 'Modernisiere den deutschen Text. Fasse direkte Reden NIE zusammen.\n'+sentence+'\n'
31
  else: