Browse Source

Merge pull request #872 from cgill95/feature/excel_conll_import

Feature/excel conll import
pull/878/head
Hiroki Nakayama 4 years ago
committed by GitHub
parent
commit
63972661f4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 2 deletions
  1. 23
      frontend/store/projects.js

23
frontend/store/projects.js

@ -65,6 +65,11 @@ export const getters = {
text: 'CoNLL',
accept: '.conll'
}
const excel = {
type: 'excel',
text: 'Excel',
accept: '.xlsx'
}
if (state.current.project_type === 'DocumentClassification') {
json.examples = [
'{"text": "Terrible customer service.", "labels": ["negative"]}\n',
@ -77,10 +82,17 @@ export const getters = {
'"Really great transaction.","positive"\n',
'"Great price.","positive"'
]
excel.examples = [
'text,label\n',
'"Terrible customer service.","negative"\n',
'"Really great transaction.","positive"\n',
'"Great price.","positive"'
]
return [
plain,
csv,
json
json,
excel
]
} else if (state.current.project_type === 'SequenceLabeling') {
json.examples = [
@ -118,10 +130,17 @@ export const getters = {
'"Good morning.","おはようございます。"\n',
'"See you.","さようなら。"'
]
excel.examples = [
'text,label\n',
'"Hello!","こんにちは!"\n',
'"Good morning.","おはようございます。"\n',
'"See you.","さようなら。"'
]
return [
plain,
csv,
json
json,
excel
]
} else {
return []

Loading…
Cancel
Save