`
@@ -360,7 +361,11 @@ Vue.component('dialogue-turn',{
// primaryElementClass is the class used to select the correct input field
// to correctly set the focus when turns are changed with arrow keys or enter
props : ["turn","currentId","myId", "primaryElementClass"],
-
+ data: function (){
+ return {
+ guiMessages
+ }
+ },
methods :{
turn_updated_string : function(event){
annotationAppEventBus.$emit("turn_updated_string", event )
@@ -404,10 +409,10 @@ Vue.component('dialogue-turn',{
- Dialogue File Format
+ {{guiMessages.selected.modal_formatInfo[0]}}
@@ -19,39 +24,15 @@ Vue.component('modal', {
- Files can be uploaded to the annotation system in one of two
- formats: either as a raw .txt file or as a JSON file in the
- correct format.
-
- If you upload a .txt file, there are no format restrictions and
- you will be taken to a screen to process it into a dialogue.
-
- If you upload a JSON file, it must be in the correct format. This
- format is as follows:
-
+ {{guiMessages.selected.modal_formatInfo[1]}}
+
+ {{guiMessages.selected.modal_formatInfo[2]}}
+
+ {{guiMessages.selected.modal_formatInfo[3]}}
-
- File is a dict with keys as the names of each dialogue
- and values as lists.
-
-
- Each value is a list of dictionaries, where each
- dictionary contains a number of key-value pairs which
- are used to display the dialogue data for annotation.
-
-
- Some key-value pairs are compulsory in order to correctly
- display the dialogue.
-
-
- The key-value pairs which are compulsory are defined in
- the annotator_config.py file in the "server" folder.
-
-
- By default, the only required key-value pair in each turn
- is called "usr" and should be the user's query as
- a string.
-
`
});
diff --git a/gui/source/utils/backend.js b/gui/source/utils/backend.js
index d5b55f6..ad66db2 100644
--- a/gui/source/utils/backend.js
+++ b/gui/source/utils/backend.js
@@ -5,15 +5,10 @@
API_LINK_BASE = `http://127.0.0.1:5000`
-
/********************************
* FILE NAME FUNCTIONS
********************************/
-
-
-
-
async function get_name(){
var dialogues = {}
diff --git a/gui/source/utils/backend_interannotator.js b/gui/source/utils/backend_interannotator.js
index 1b3fde4..0f24166 100644
--- a/gui/source/utils/backend_interannotator.js
+++ b/gui/source/utils/backend_interannotator.js
@@ -2,11 +2,14 @@
* AGREEMENT SCORES
********************************/
+API_LINK_BASE = "127.0.0.1:5001"
+
+
async function get_scores_async(){
var dialogues = {}
- const apiLink = `http://127.0.0.1:5000/agreements`
+ const apiLink = API_LINK_BASE+"/agreements"
try {
var response = await axios.get( apiLink );
@@ -32,7 +35,7 @@ async function get_errors_async(dialogueId){
var dialogues = {}
- const apiLink = `http://127.0.0.1:5000/errors/${dialogueId}`
+ const apiLink = API_LINK_BASE+"/errors/${dialogueId}"
try {
var response = await axios.get( apiLink );
@@ -58,7 +61,7 @@ async function put_error_async(error, meta, errorId, dialogueId){
errorId : errorId,
dialogueId : dialogueId
}
- const apiLink = `http://127.0.0.1:5000/errors`
+ const apiLink = API_LINK_BASE+"/errors"
try {
var response = await axios.put( apiLink, params );
@@ -84,7 +87,7 @@ async function annotate_query(query){
var dialogues = {}
- const apiLink = 'http://127.0.0.1:5000/turns'
+ const apiLink = API_LINK_BASE+"/turns"
try {
var response = await axios.post( apiLink, { query: query} );
console.log(response.data)
@@ -112,7 +115,7 @@ async function get_annotation_style_async(){
var dialogues = {}
- const apiLink = 'http://127.0.0.1:5000/dialogue_annotationstyle'
+ const apiLink = API_LINK_BASE+"/dialogue_annotationstyle"
try {
var response = await axios.get(apiLink)
@@ -140,7 +143,7 @@ async function get_all_dialogue_ids_async() {
var dialogues = {}
- const apiLink = 'http://127.0.0.1:5000/dialogues_metadata'
+ const apiLink = API_LINK_BASE+"/dialogues_metadata"
try {
@@ -165,7 +168,7 @@ async function get_all_dialogue_ids_async() {
async function change_dialogue_name_async(oldName, newName) {
- const apiLink = `http://127.0.0.1:5000/dialogues_metadata/${oldName}`
+ const apiLink = API_LINK_BASE+"/dialogues_metadata/${oldName}"
try {
@@ -307,8 +310,8 @@ async function RESTdialogues(method, id, params){
console.log("PARAMS "+params)
//
- if (id==null) {var apiLink = `http://127.0.0.1:5000/dialogues`;}
- else {var apiLink = `http://127.0.0.1:5000/dialogues/${id}`;}
+ if (id==null) {var apiLink = API_LINK_BASE+"/dialogues";}
+ else {var apiLink = API_LINK_BASE+"/dialogues/${id}";}
//
if (method=="DELETE") {
diff --git a/gui/source/utils/languages.js b/gui/source/utils/languages.js
new file mode 100644
index 0000000..9e41419
--- /dev/null
+++ b/gui/source/utils/languages.js
@@ -0,0 +1,176 @@
+/************************************
+* Language Config file
+*************************************/
+
+guiMessages = {
+ en: {
+ admin: {
+ dataItems: "Data Items",
+ visited: "Visited",
+ button_downloadAll:"Download All Data",
+ button_interAgreement:"Inter-annotator Agreement",
+ annotators:"Annotators",
+ button_upload:"Upload File or Drag and Drop"
+ },
+ lida: {
+ button_fileFormatInfo: "File Format Info",
+ button_delete: "Delete",
+ turns: "Turns",
+ button_newDialogue: "Add a New Dialogue",
+ interfaceLanguage: "Interface Language:"
+ },
+ annotation_app: {
+ turnId: "Turn Id",
+ enter: "Enter",
+ save: "Save",
+ enterQuery:"Enter New Query",
+ allSaved: "All Changes Saved",
+ unsaved: "Unsaved Changes",
+ backToAll: "Back to All Dialogues",
+ },
+ resolution_app: {
+ errorId: "Error Id:",
+ name: "Name:",
+ accepted: "Accepted",
+ review: "Review",
+ fail: "FAIL!",
+ accept:"Accept"
+ },
+ modal_formatInfo:
+ [
+ `
+ Dialoque File Format
+ `,
+ `
+ Files can be uploaded to the annotation system in one of two
+ formats: either as a raw .txt file or as a JSON file in the
+ correct format.
+ `,
+ `
+ If you upload a .txt file, there are no format restrictions and
+ you will be taken to a screen to process it into a dialogue.
+ `,
+ `
+ If you upload a JSON file, it must be in the correct format. This
+ format is as follows:
+ `
+ ],
+ modal_formatInfo_list:
+ [
+ `
+ File is a dict with keys as the names of each dialogue
+ and values as lists.
+ `,
+ `
+ Each value is a list of dictionaries, where each
+ dictionary contains a number of key-value pairs which
+ are used to display the dialogue data for annotation.
+ `,
+ `
+ Some key-value pairs are compulsory in order to correctly
+ display the dialogue.
+ `,
+ `
+ The key-value pairs which are compulsory are defined in
+ the annotator_config.py file in the "server" folder.
+ `,
+ `
+ By default, the only required key-value pair in each turn
+ is called "usr" and should be the user's query as
+ a string.
+ `
+ ],
+ modal_agreementScores:
+ [
+ "Inter-annotator Agreement Scores",
+ "This represents a report for your data.",
+ "Available Annotations:",
+ "Overall"
+ ]
+ },
+ it: {
+ admin: {
+ dataItems: "Dialoghi",
+ visited: "Visitati",
+ button_downloadAll:"Scarica tutti i dati",
+ button_interAgreement:"Indice di concordanza",
+ annotators:"Annotatori",
+ button_upload:"Carica o trascina un file"
+ },
+ lida: {
+ button_fileFormatInfo: "Info sui formati",
+ button_delete: "Elimina",
+ turns: "Turni",
+ button_newDialogue: "Aggiungi un nuovo Dialogo",
+ interfaceLanguage: "Lingua Interfaccia:"
+
+ },
+ annotation_app: {
+ turnId: "Id Turno",
+ enter: "Invia",
+ save: "Salva",
+ enterQuery: "Nuova richiesta",
+ allSaved: "Modifiche salvate",
+ unsaved: "Cambiamenti non salvati",
+ backToAll: "Indietro"
+ },
+ resolution_app: {
+ errorId: "Id Conflitto:",
+ name: "Nome:",
+ accepted: "Accettato",
+ review: "Revisiona",
+ fail: "ERRORE!",
+ accept:"Accetta"
+ },
+ modal_formatInfo:
+ [
+ `
+ Formato dei File Dialogo
+ `,
+ `
+ I file possono essere caricati nel sistema in uno dei due formati:
+ un file grezzo .txt oppure un file JSON nel formato richiesto.
+ `,
+ `
+ Se viene caricato un file .txt, non ci sono restrizioni di formato
+ e si aprirà una schermata per processarlo in un dialogo.
+ `,
+ `
+ Se carichi un file JSON, deve essere nel formato corretto.
+ Il formato richiesto è il seguente:
+ `
+ ],
+ modal_formatInfo_list:
+ [
+ `
+ Un file dizionario con chiavi come nomi dei dialoghi
+ e valori come liste.
+ `,
+ `
+ Ogni valore è una lista di dizionari, dove ogni
+ dizionario contiene un numero di coppie chiave-valore
+ usate per mostrare i dati del dialogo da annotare.
+ `,
+ `
+ Alcune coppie chiave-valore sono obbligatorie per
+ mostrare correttamente il dialogo.
+ `,
+ `
+ Le coppie obbligatorie sono definite nel file
+ annotator_config.py nella cartella "server".
+ `,
+ `
+ Di default, l'unica coppia chiave-valore obbligatoria è
+ chiamata "usr" e dovrebbe essere la stringa contenente
+ la richiesta dell'utente.
+ `
+ ],
+ modal_agreementScores:
+ [
+ "Indice di Concordanza tra gli annotatori",
+ "Questo è un rapporto suoi tuoi dati.",
+ "Annotazioni disponibili:",
+ "Riepilogo"
+ ]
+ },
+}
\ No newline at end of file
diff --git a/server/interannotator_app.py b/server/interannotator_app.py
index 4f071c3..ebb8f11 100644
--- a/server/interannotator_app.py
+++ b/server/interannotator_app.py
@@ -71,7 +71,7 @@ def set_main_path(self, path=None):
os.mkdir(self.path)
- def run(self, port=5000):
+ def run(self, port=5001):
"""
runs the app
"""