Browse Source

Add download examples

pull/1310/head
Hironsan 3 years ago
parent
commit
3a863d09b0
2 changed files with 55 additions and 0 deletions
  1. 0
      app/api/views/download/__init__.py
  2. 55
      app/api/views/download/examples.py

0
app/api/views/download/__init__.py

55
app/api/views/download/examples.py

@ -0,0 +1,55 @@
Category_CSV = """
text,label
"Terrible customer service.","negative"
"Really great transaction.","positive"
"Great price.","positive"
"""
Category_fastText = """
__label__negative Terrible customer service.
__label__positive Really great transaction.
__label__positive Great price.
"""
Category_JSON = """
[
{
"text": "Terrible customer service.",
"label": ["negative"]
}
]
"""
Category_JSONL = """
{"text": "Terrible customer service.", "label": ["negative"]}
{"text": "Really great transaction.", "label": ["positive"]}
{"text": "Great price.", "label": ["positive"]}
"""
Text_CSV = """
text,label
"Hello!","こんにちは!"
"Good morning.","おはようございます。"
"See you.","さようなら。"
"""
Text_JSON = """
[
{
"text": "Hello!",
"label": ["こんにちは!"]
}
]
"""
Text_JSONL = """
{"text": "Hello!", "label": ["こんにちは!"]}
{"text": "Good morning.", "label": ["おはようございます。"]}
{"text": "See you.", "label": ["さようなら。"]}
"""
Offset_JSONL = """
{"text": "EU rejects German call to boycott British lamb.", "label": [ [0, 2, "ORG"], [11, 17, "MISC"], ... ]}
{"text": "Peter Blackburn", "label": [ [0, 15, "PERSON"] ]}
{"text": "President Obama", "label": [ [10, 15, "PERSON"] ]}
"""
Loading…
Cancel
Save