From 3a863d09b02027254a5b0f5ea23b02cf45253e08 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Thu, 15 Apr 2021 15:11:34 +0900 Subject: [PATCH] Add download examples --- app/api/views/download/__init__.py | 0 app/api/views/download/examples.py | 55 ++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 app/api/views/download/__init__.py create mode 100644 app/api/views/download/examples.py diff --git a/app/api/views/download/__init__.py b/app/api/views/download/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/api/views/download/examples.py b/app/api/views/download/examples.py new file mode 100644 index 00000000..11f51e60 --- /dev/null +++ b/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"] ]} +"""