alvp commited on
Commit
0880270
β€’
1 Parent(s): dbf2eca

Added new poem

Browse files
Files changed (2) hide show
  1. app.py +1 -0
  2. poems.py +29 -18
app.py CHANGED
@@ -61,6 +61,7 @@ def filter_candidates(candidates, get_any_candidate=False):
61
 
62
 
63
  def infer_candidates(nlp, line):
 
64
  line = re.sub("’", "'", line)
65
  line = re.sub("…", "...", line)
66
  inputs = nlp._parse_and_tokenize(line)
 
61
 
62
 
63
  def infer_candidates(nlp, line):
64
+ line = re.sub("–", "-", line)
65
  line = re.sub("’", "'", line)
66
  line = re.sub("…", "...", line)
67
  inputs = nlp._parse_and_tokenize(line)
poems.py CHANGED
@@ -88,24 +88,35 @@ SAMPLE_POEMS = {
88
  "I took the one less traveled by,",
89
  "And that has made all the difference."],
90
  "en_2": [
91
- "April is the cruellest month, breeding",
92
- "Lilacs out of the dead land, mixing",
93
- "Memory and desire, stirring",
94
- "Dull roots with spring rain.",
95
- "Winter kept us warm, covering",
96
- "Earth in forgetful snow, feeding",
97
- "A little life with dried tubers.",
98
- "Summer surprised us, coming over the Starnbergersee",
99
- "With a shower of rain; we stopped in the colonnade,",
100
- "And went on in sunlight, into the Hofgarten,",
101
- "And drank coffee, and talked for an hour.",
102
- "Bin gar keine Russin, stamm' aus Litauen, echt deutsch.",
103
- "And when we were children, staying at the arch-duke's,",
104
- "My cousin's, he took me out on a sled,",
105
- "And I was frightened. He said, Marie,",
106
- "Marie, hold on tight. And down we went.",
107
- "In the mountains, there you feel free.",
108
- "I read, much of the night, and go south in the winter."],
 
 
 
 
 
 
 
 
 
 
 
109
  "de_1": [
110
  "Der du von dem Himmel bist,",
111
  "Alles Leid und Schmerzen stillest,",
 
88
  "I took the one less traveled by,",
89
  "And that has made all the difference."],
90
  "en_2": [
91
+ "Because I could not stop for Death -",
92
+ "He kindly stopped for me -",
93
+ "The Carriage held but just Ourselves -",
94
+ "And Immortality.",
95
+ "",
96
+ "We slowly drove - He knew no haste",
97
+ "And I had put away",
98
+ "My labor and my leisure too,",
99
+ "For His Civility -",
100
+ "",
101
+ "We passed the School, where Children strove",
102
+ "At Recess - in the Ring -",
103
+ "We passed the Fields of Gazing Grain -",
104
+ "We passed the Setting Sun -",
105
+ "",
106
+ "Or rather - He passed Us -",
107
+ "The Dews drew quivering and Chill -",
108
+ "For only Gossamer, my Gown -",
109
+ "My Tippet - only Tulle -",
110
+ "",
111
+ "We paused before a House that seemed",
112
+ "A Swelling of the Ground -",
113
+ "The Roof was scarcely visible -",
114
+ "The Cornice - in the Ground -",
115
+ "",
116
+ "Since then - 'tis Centuries - and yet",
117
+ "Feels shorter than the Day",
118
+ "I first surmised the Horses' Heads",
119
+ "Were toward Eternity -"],
120
  "de_1": [
121
  "Der du von dem Himmel bist,",
122
  "Alles Leid und Schmerzen stillest,",