Spaces:
Runtime error
Runtime error
Commit
·
650a281
1
Parent(s):
1c847b3
Add capybara text
Browse files- src/text.py +12 -8
src/text.py
CHANGED
@@ -26,16 +26,20 @@
|
|
26 |
|
27 |
# Developed from ponies taken to Iceland by Norse settlers in the 9th and 10th centuries, the breed is mentioned in literature and historical records throughout Icelandic history; the first reference to a named horse appears in the 12th century. Horses were venerated in Norse mythology, a custom brought to Iceland by the country's earliest settlers. Selective breeding over the centuries has developed the breed into its current form. Natural selection has also played a role, as the harsh Icelandic climate eliminated many horses through exposure and malnourishment. In the 1780s, much of the breed was wiped out in the aftermath of a volcanic eruption at Laki. The first breed society for the Icelandic horse was created in Iceland in 1904, and today the breed is represented by organizations in 19 different nations, organized under a parent association, the International Federation of Icelandic Horse Associations.
|
28 |
# """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
target_text = """
|
30 |
-
The
|
31 |
-
The best performing models also connect the encoder and decoder through an attention mechanism.
|
32 |
-
We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely.
|
33 |
-
Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train.
|
34 |
-
Our model achieves 28.4 BLEU on the WMT 2014 English-to-German translation task, improving over the existing best results, including ensembles by over 2 BLEU.
|
35 |
-
On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature.
|
36 |
-
We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data.
|
37 |
-
"""
|
38 |
|
|
|
|
|
39 |
|
40 |
def get_text():
|
41 |
return target_text
|
|
|
26 |
|
27 |
# Developed from ponies taken to Iceland by Norse settlers in the 9th and 10th centuries, the breed is mentioned in literature and historical records throughout Icelandic history; the first reference to a named horse appears in the 12th century. Horses were venerated in Norse mythology, a custom brought to Iceland by the country's earliest settlers. Selective breeding over the centuries has developed the breed into its current form. Natural selection has also played a role, as the harsh Icelandic climate eliminated many horses through exposure and malnourishment. In the 1780s, much of the breed was wiped out in the aftermath of a volcanic eruption at Laki. The first breed society for the Icelandic horse was created in Iceland in 1904, and today the breed is represented by organizations in 19 different nations, organized under a parent association, the International Federation of Icelandic Horse Associations.
|
28 |
# """
|
29 |
+
# target_text = """
|
30 |
+
# The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration.
|
31 |
+
# The best performing models also connect the encoder and decoder through an attention mechanism.
|
32 |
+
# We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely.
|
33 |
+
# Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train.
|
34 |
+
# Our model achieves 28.4 BLEU on the WMT 2014 English-to-German translation task, improving over the existing best results, including ensembles by over 2 BLEU.
|
35 |
+
# On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature.
|
36 |
+
# We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data.
|
37 |
+
# """
|
38 |
target_text = """
|
39 |
+
You thought the beaver was a rodent of unusual size? The capybara is twice that big—the biggest rodent on Earth. These impressive semi-aquatic mammals are found throughout much of northern and central South America, though a small invasive population has been seen in Florida. They’re closely related to guinea pigs and rock cavies, and more distantly related to chinchillas and agouti.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
Like beavers, capybaras are strong swimmers. Their pig-shaped bodies are adapted for life in bodies of water found in forests, seasonally flooded savannas, and wetlands. Their toes are partially webbed for paddling around, and their reddish to dark brown fur is long and brittle—perfect for drying out quickly on land. Small eyes, noses, and hairless ears are located high on their heads so that their faces remain exposed and alert when most of their body is submerged.
|
42 |
+
"""
|
43 |
|
44 |
def get_text():
|
45 |
return target_text
|