const intentIdentify = require('./intentIdentifyInteractor')
+ const intentIdentifyInteractor = require('./intentIdentifyInteractor')
/**
- * Returns a map of all processed transcripts and their identified intents
- * by reading through the newly uploaded trasnscripts and identifying new
- * transcripts using {@link intentIdentifierInteractor} Use Case.
+ * Returns a map of all processed transcripts and their identified intents.
+ * Currently, our processing algorithm iterates through the newly uploaded transcripts and identifies new
+ * intents using {@link intentIdentifyInteractor} Use Case.
+ * If we would like to add more processing steps for a transcript in the future, we can easily do so in this file.
* @interactor
* @param {Object} existingProcessedMap - Map of already processed transcripts with their intents.
* @param {Array} transcript_json_list - List of transcripts to be uploaded
* @return {Map} allCurrentIntents - Map of all processed transcripts (uploaded by user) and their intents.
*/
-const transcriptProcessInteractor = (existingProcessedMap, transcript_json_list) =>{
- const allCurrentIntents = intentIdentify(existingProcessedMap, transcript_json_list)
+const transcriptProcessInteractor = (existingProcessedMap, transcript_json_list) => {
+ const allCurrentIntents = intentIdentifyInteractor(existingProcessedMap, transcript_json_list)
return allCurrentIntents
}
@@ -75,7 +76,7 @@ TranscriptUseCases/transcriptProcessInteractor.js
diff --git a/documentation/TranscriptUseCases_transcriptUploadInteractor.js.html b/documentation/TranscriptUseCases_transcriptUploadInteractor.js.html
index 27ff27b0..80dc5aea 100644
--- a/documentation/TranscriptUseCases_transcriptUploadInteractor.js.html
+++ b/documentation/TranscriptUseCases_transcriptUploadInteractor.js.html
@@ -29,7 +29,7 @@
@@ -45,13 +45,21 @@ TranscriptUseCases/transcriptUploadInteractor.js
- const processTranscriptInteractor = require('./transcriptProcessInteractor')
+ const transcriptProcessInteractor = require('./transcriptProcessInteractor')
+const convertMultiWOZInteractor = require('./convertMultiWOZInteractor')
/**
- * Processes the transcript that the user has uploaded using
- * {@link transcriptProcessInteractor} Use Case, which identifies intents using
- * {@link intentIdentifierInteractor} Use Case, and finally saves the transcript
+ * Processes the transcript that the user has uploaded using the {@link convertMultiWOZInteractor} and
+ * {@link transcriptProcessInteractor} Use Cases (the latter of which identifies intents using the
+ * {@link intentIdentifierInteractor} Use Case), and saves the transcript
* and the intents to the database.
+ * Open-Closed Principle: does not modify our existing code-base significantly;
+ * only extends the functionality by adding step to convert a MultiWOZ transcript before applying the
+ * original processTranscript function from transcriptProcessor.
+ * Liskov Substitution Principle: a transcript containing a single conversation is a subtype
+ * of a transcript containing multiple conversations, so we may upload a transcript containing
+ * one conversation as a substitute of a typical transcript containing an unknown number of conversations.
+ * (Technically, LSP has more to do with interfaces and implementation, but it is still relevant here.)
* @interactor
* @param {mongoose.Schema} user - The current authorized user of the website
* @param {JSON} file - The JSON transcript file that the user has uploaded
@@ -63,81 +71,74 @@ TranscriptUseCases/transcriptUploadInteractor.js
throw new Error("Not a valid user")
}
- //make sure the name of the newly uploaded file doesn't exist in database
- //i.e., make sure its name is unique
+ // This checks the name of the newly uploaded file doesn't exist in database
+ // i.e., make sure its name is unique
let transcriptNames = []
- const existingTranscriptInfo = Object.entries(user.transcripts)
+ const existingTranscriptInfo = user.transcripts
try {
existingTranscriptInfo.forEach(info => {
- transcriptNames.push(Object.entries(info[1])[0][0])
+ transcriptNames.push(info.filename)
})
}
catch (e) {
throw new Error("Error in retrieving transcript names", e)
}
-
- //confirm the filename is unique, or send an error
+ // confirm the filename is unique, or send an error
if (!transcriptNames.includes(filename)) {
- await userSaveTranscriptAndIntents()
+ userSaveTranscriptAndIntents()
}
else {
throw new Error("A transcript with the same name already exists")
}
- //use other use cases to identify intents and save the transcript and intents
+ // use other use cases to identify intents and save the transcript and intents
async function userSaveTranscriptAndIntents() {
- try {
- //retrieve existing transcript information (i.e., identified intents)
- const json = JSON.parse(file)
- let allCurrentIntents = new Map()
- if (user.intents !== undefined) {
- allCurrentIntents = new Map(Object.entries(user.intents))
- }
+ //retrieve existing transcript information (i.e., identified intents)
+ const json = JSON.parse(file)
+ let convertedMultiWOZtoOrigList = convertMultiWOZInteractor(json);
+
+ // prepare allCurrentIntents variable representing user's existing intents (if they have any)
+ let allCurrentIntents = new Map()
+ if (user.intents !== undefined) {
+ allCurrentIntents = new Map(Object.entries(user.intents))
+ }
- //single transcript processing; get intents in the newly uploaded files
- let intentsForThisFile = processTranscriptInteractor(new Map(), [json])
+ for (let i = 0; i < convertedMultiWOZtoOrigList.length; i++) {
+ let currTranscript = convertedMultiWOZtoOrigList[i] // originally a string
+ currTranscript = JSON.parse(currTranscript) // now a JSON object
- //multiple transcript processing; merge the result with the existing intents
- allCurrentIntents = processTranscriptInteractor(allCurrentIntents, [json])
+ // single transcript processing; get intents in the newly uploaded files
+ let intentsForThisFile = transcriptProcessInteractor(new Map(), [currTranscript])
- addTranscriptToUser()
- addIntentsToUser()
- // just do one save: it will be obvious through the thrown errors if
- // there is an error in saving transcripts or intents
- try {
- await user.save()
- }
- catch (e) {
- throw new Error("Error in saving intents", e)
- }
+ // multiple transcript processing
+ allCurrentIntents = transcriptProcessInteractor(allCurrentIntents, [currTranscript])
- //saving aggregate intents to the database
- function addIntentsToUser() {
- try {
- user.intents = allCurrentIntents
- // await user.save()
- }
- catch (e) {
- throw new Error("Error in saving intents", e)
- }
- }
+ addTranscriptToUser(i, intentsForThisFile)
+ user.intents = allCurrentIntents // overwrite user's intents with the current intents
+ }
- //saving newly uploaded transcripts with their intents to the database
- function addTranscriptToUser() {
- try {
- const obj = {}
- obj[filename] = file
- obj["intents"] = intentsForThisFile
- user.transcripts = user.transcripts.concat(obj)
- // await user.save() See comments at bottom re: only one save
- }
- catch (e) {
- throw new Error("Error in saving transcripts", e)
- }
- }
+ try {
+ await user.save()
}
catch (e) {
- throw new Error("Invalid file format")
+ throw new Error("Error in saving intents", e)
+ }
+
+ function addTranscriptToUser(i, intentsForThisFile) {
+ try {
+ const obj = {}
+ let currTranscriptFilename = filename
+ if (i !== 0) {
+ currTranscriptFilename = currTranscriptFilename + `_${i}`
+ }
+ obj["file"] = file
+ obj["intents"] = intentsForThisFile
+ obj["filename"] = currTranscriptFilename
+ user.transcripts = user.transcripts.concat(obj)
+ }
+ catch (e) {
+ throw new Error("Error in saving transcripts", e)
+ }
}
}
}
@@ -156,7 +157,7 @@ TranscriptUseCases/transcriptUploadInteractor.js
diff --git a/documentation/UseCases_GetUseCases_getAllIntentsInteractor.js.html b/documentation/UseCases_GetUseCases_getAllIntentsInteractor.js.html
deleted file mode 100644
index 71a3d05f..00000000
--- a/documentation/UseCases_GetUseCases_getAllIntentsInteractor.js.html
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/GetUseCases/getAllIntentsInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/GetUseCases/getAllIntentsInteractor.js
-
-
-
-
-
-
-
-
- /**
- * Returns the intents of the user.
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website
- * @returns {Object} user.intents - intents identified in user's transcipts.
- */
-const getAllIntentsInteractor = (user) =>{
- return user.intents
-}
-
-module.exports = getAllIntentsInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/documentation/UseCases_GetUseCases_getSpecificIntentsInteractor.js.html b/documentation/UseCases_GetUseCases_getSpecificIntentsInteractor.js.html
deleted file mode 100644
index 9e811f3f..00000000
--- a/documentation/UseCases_GetUseCases_getSpecificIntentsInteractor.js.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/GetUseCases/getSpecificIntentsInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/GetUseCases/getSpecificIntentsInteractor.js
-
-
-
-
-
-
-
-
- /**
- * Returns the intents of the single transcript requested by the user.
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website.
- * @param {String} name - Name of the transcript file requested by the user.
- * @returns {Object} user.intents - The intents identified in user's transcipts.
- */
-const getSpecificIntentsInteractor = (user, name) =>{
- const transcript = user.transcripts
- for(const obj of transcript){
- if(name in obj){
- return obj.intents
- }
- }
- return "No intents"
-}
-
-module.exports = getSpecificIntentsInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/documentation/UseCases_GetUseCases_getTranscriptsInteractor.js.html b/documentation/UseCases_GetUseCases_getTranscriptsInteractor.js.html
deleted file mode 100644
index f0f97255..00000000
--- a/documentation/UseCases_GetUseCases_getTranscriptsInteractor.js.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/GetUseCases/getTranscriptsInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/GetUseCases/getTranscriptsInteractor.js
-
-
-
-
-
-
-
-
- /**
- * Returns all the transcripts uploaded by the user.
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website.
- * @returns {Object} user.transcripts - The transcripts uploaded by the user
- */
-const getTranscriptsInteractor = (user) => {
- if (user.transcripts !== undefined) {
- return user.transcripts
- }
- return 'user not a valid User model or user does not have transcripts property';
-}
-
-module.exports = getTranscriptsInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/documentation/UseCases_TranscriptUseCases_intentIdentifyInteractor.js.html b/documentation/UseCases_TranscriptUseCases_intentIdentifyInteractor.js.html
deleted file mode 100644
index af103f5e..00000000
--- a/documentation/UseCases_TranscriptUseCases_intentIdentifyInteractor.js.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/TranscriptUseCases/intentIdentifyInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/TranscriptUseCases/intentIdentifyInteractor.js
-
-
-
-
-
-
-
-
- const processTranscript = require('./transcriptProcessInteractor')
-
-/**
- * Returns a map of all processed transcripts and their identified intents
- * by processing newly uploaded transcripts and merging the resulting map
- * with the already existing one.
- * @interactor
- * @param {Object} existingProcessedMap - Map of already processed transcripts with their intents.
- * @param {Array} transcript_json_list - List of transcripts to be uploaded
- * @return {Map} allCurrentIntents - Map of all processed transcripts (uploaded by user) and their intents.
- */
-const intentIdentifyInteractor = (existingProcessedMap, transcript_json_list) =>{
- const allCurrentIntents = processTranscript(existingProcessedMap, transcript_json_list)
- return allCurrentIntents
-}
-
-module.exports = intentIdentifyInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/documentation/UseCases_TranscriptUseCases_transcriptProcessInteractor.js.html b/documentation/UseCases_TranscriptUseCases_transcriptProcessInteractor.js.html
deleted file mode 100644
index 2aae3db6..00000000
--- a/documentation/UseCases_TranscriptUseCases_transcriptProcessInteractor.js.html
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/TranscriptUseCases/transcriptProcessInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/TranscriptUseCases/transcriptProcessInteractor.js
-
-
-
-
-
-
-
-
- /**
- * Returns a map of all processed transcripts and their identified intents
- * by processing newly uploaded transcripts and merging the resulting map
- * with the already existing one.
- * @interactor
- * @param {Object} existingProcessedMap - Map of already processed transcripts with their intents.
- * @param {Array} transcript_json_list - List of transcripts to be uploaded
- * @return {Map} processedMap - Map of all processed transcripts of user and their intents.
- */
-
-function transcriptProcessInteractor(existingProcessedMap, transcript_json_list) {
- let processedMap = new Map(existingProcessedMap)
-
- for (const transcript_json of transcript_json_list) {
- processSingleTranscript(transcript_json, processedMap);
- }
- return processedMap
-
-}
-
-function processSingleTranscript(transcript_json, processedMap) {
- let prevIntent = undefined; // initialize
-
- // iterate over each message in a single transcript
- for (let i = 0; i < transcript_json.length; i++) {
- let message = transcript_json[i];
- // some intents have multiple intents, so we iterate through that as well
- for (const intent of message.intents) {
- updateCurrIntentInProcessedMap(intent);
-
- if (prevIntent !== undefined && prevIntent !== intent) {
- updatePrevIntentInProcessedMap(intent);
- }
- prevIntent = intent;
- }
- }
-
- function updateCurrIntentInProcessedMap(intent) {
- if (!processedMap.has(intent)) { // add intent to processedMap
- processedMap.set(intent, [1, new Map()]);
- }
- else { // update existing intent frequency and its associates in the map
- const currList = processedMap.get(intent);
- const newIntentFreq = currList[0] + 1;
- const sameAssociateMap = currList[1];
-
- processedMap.set(intent, [newIntentFreq, sameAssociateMap]);
- }
- }
-
- function updatePrevIntentInProcessedMap(intent) {
- const currList = processedMap.get(prevIntent);
- let newAssociateMap = undefined;
- if (currList[1] instanceof Map) {
- newAssociateMap = currList[1];
- }
- else {
- newAssociateMap = new Map(Object.entries(currList[1]));
- }
- if (!newAssociateMap.has(intent)) {
- newAssociateMap.set(intent, 1);
- }
- else {
- const newIntentAssociateFreq = newAssociateMap.get(intent) + 1;
- newAssociateMap.set(intent, newIntentAssociateFreq);
- }
- currList[1] = newAssociateMap;
- }
-}
-
-module.exports = transcriptProcessInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/documentation/UseCases_TranscriptUseCases_transcriptUploadInteractor.js.html b/documentation/UseCases_TranscriptUseCases_transcriptUploadInteractor.js.html
deleted file mode 100644
index b6d2c101..00000000
--- a/documentation/UseCases_TranscriptUseCases_transcriptUploadInteractor.js.html
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/TranscriptUseCases/transcriptUploadInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/TranscriptUseCases/transcriptUploadInteractor.js
-
-
-
-
-
-
-
-
- const processTranscriptInteractor = require('./intentIdentifyInteractor')
-
-/**
- * Processes the transcript that the user has uploaded using
- * transcriptProcessInteractor Use Case, then identifies intents using
- * intentIdentifierInteractor Use Case, and finally saves the transcript
- * and the intents to the database.
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website
- * @param {JSON} file - The JSON transcript file that the user has uploaded
- * @param {String} filename - Name of the file the user has uploaded
- */
-const transcriptUploadInteractor = async (user, file, filename) => {
- if (user.transcripts === undefined || user.email === undefined) { throw new Error("Not a valid user") }
- let transcriptNames = []
- const existingTranscriptInfo = Object.entries(user.transcripts)
- try {
- existingTranscriptInfo.forEach(info => {
- transcriptNames.push(Object.entries(info[1])[0][0])
- })
- }
- catch (e) {
- throw new Error("Error in retrieving transcript names", e)
- }
-
- if (!transcriptNames.includes(filename)) {
- await userSaveTranscriptAndIntents()
- }
-
- else {
- throw new Error("A transcript with the same name already exists")
- }
-
-
- async function userSaveTranscriptAndIntents() {
- try {
- const json = JSON.parse(file)
- let allCurrentIntents = new Map()
- if (user.intents !== undefined) {
- allCurrentIntents = new Map(Object.entries(user.intents))
- }
-
- //single transcript processing
- let intentsForThisFile = processTranscriptInteractor(new Map(), [json])
-
- //multiple transcript processing
- allCurrentIntents = processTranscriptInteractor(allCurrentIntents, [json])
-
- addTranscriptToUser()
- addIntentsToUser()
- // just do one save: it will be obvious through the thrown errors if
- // there is an error in saving transcripts or intents
- try {
- await user.save()
- }
- catch (e) {
- throw new Error("Error in saving intents", e)
- }
-
- function addIntentsToUser() {
- try {
- user.intents = allCurrentIntents
- // await user.save()
- }
- catch (e) {
- throw new Error("Error in saving intents", e)
- }
- }
-
- function addTranscriptToUser() {
- try {
- const obj = {}
- obj[filename] = file
- obj["intents"] = intentsForThisFile
- user.transcripts = user.transcripts.concat(obj)
- // await user.save() See comments at bottom re: only one save
- }
- catch (e) {
- throw new Error("Error in saving transcripts", e)
- }
- }
- } catch (e) {
- throw new Error("Invalid file format")
- }
- }
-}
-
-module.exports = transcriptUploadInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/documentation/UseCases_UserUseCases_userLoginInteractor.js.html b/documentation/UseCases_UserUseCases_userLoginInteractor.js.html
deleted file mode 100644
index b57b273b..00000000
--- a/documentation/UseCases_UserUseCases_userLoginInteractor.js.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/UserUseCases/userLoginInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/UserUseCases/userLoginInteractor.js
-
-
-
-
-
-
-
-
- const User = require('../../Entities/UserSchema')
-const jwt = require('jsonwebtoken')
-
-/**
- * Checks if email and password combination exists in the database,
- * and if it does, logs the user in.
- * @interactor
- * @param {String} email - The email given by the user
- * @param {String} password - The password chosen by the user
- */
-const userLoginInteractor = async (email, password) =>{
- const user = await User.findOne({email, password})
- if(!user){
- throw new Error("Unable to find user.")
- }
- const userId = user._id.toString()
- const token = jwt.sign({ _id: userId }, 'by order of the techy blinders')
- return token
-}
-
-module.exports = userLoginInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/documentation/UseCases_UserUseCases_userRegisterInteractor.js.html b/documentation/UseCases_UserUseCases_userRegisterInteractor.js.html
deleted file mode 100644
index be42708d..00000000
--- a/documentation/UseCases_UserUseCases_userRegisterInteractor.js.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
- JSDoc: Source: UseCases/UserUseCases/userRegisterInteractor.js
-
-
-
-
-
-
-
-
-
-
-
-
- Source: UseCases/UserUseCases/userRegisterInteractor.js
-
-
-
-
-
-
-
-
- const User = require('../../Entities/UserSchema')
-
-/**
- * Creates the user and registers it to the database.
- * @interactor
- * @param {String} email - The email given by the user
- * @param {String} password - The password chosen by the user
- */
-const userRegisterInteractor = async (email, password) => {
- if (validateEmail(email)) {
- const user = new User({ email, password })
-
- try {
- await user.save()
- return user
- }
- catch (e) {
- console.log(e)
- }
- } else {
- throw new Error("Unable to register user: email invalid.")
- }
-
-}
-
-function validateEmail(email) {
- // use regex to check if email is a valid email
- const res = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
- return res.test(String(email).toLowerCase());
-}
-
-module.exports = userRegisterInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/server/docs/UserUseCases_userLoginInteractor.js.html b/documentation/UserUseCases_userLoginInteractor.js.html
similarity index 100%
rename from server/docs/UserUseCases_userLoginInteractor.js.html
rename to documentation/UserUseCases_userLoginInteractor.js.html
diff --git a/server/docs/UserUseCases_userRegisterInteractor.js.html b/documentation/UserUseCases_userRegisterInteractor.js.html
similarity index 100%
rename from server/docs/UserUseCases_userRegisterInteractor.js.html
rename to documentation/UserUseCases_userRegisterInteractor.js.html
diff --git a/documentation/fonts/OpenSans-Bold-webfont.eot b/documentation/fonts/OpenSans-Bold-webfont.eot
deleted file mode 100644
index 5d20d916..00000000
Binary files a/documentation/fonts/OpenSans-Bold-webfont.eot and /dev/null differ
diff --git a/documentation/fonts/OpenSans-Bold-webfont.svg b/documentation/fonts/OpenSans-Bold-webfont.svg
deleted file mode 100644
index 3ed7be4b..00000000
--- a/documentation/fonts/OpenSans-Bold-webfont.svg
+++ /dev/null
@@ -1,1830 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/documentation/fonts/OpenSans-Bold-webfont.woff b/documentation/fonts/OpenSans-Bold-webfont.woff
deleted file mode 100644
index 1205787b..00000000
Binary files a/documentation/fonts/OpenSans-Bold-webfont.woff and /dev/null differ
diff --git a/documentation/fonts/OpenSans-BoldItalic-webfont.eot b/documentation/fonts/OpenSans-BoldItalic-webfont.eot
deleted file mode 100644
index 1f639a15..00000000
Binary files a/documentation/fonts/OpenSans-BoldItalic-webfont.eot and /dev/null differ
diff --git a/documentation/fonts/OpenSans-BoldItalic-webfont.svg b/documentation/fonts/OpenSans-BoldItalic-webfont.svg
deleted file mode 100644
index 6a2607b9..00000000
--- a/documentation/fonts/OpenSans-BoldItalic-webfont.svg
+++ /dev/null
@@ -1,1830 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/documentation/fonts/OpenSans-BoldItalic-webfont.woff b/documentation/fonts/OpenSans-BoldItalic-webfont.woff
deleted file mode 100644
index ed760c06..00000000
Binary files a/documentation/fonts/OpenSans-BoldItalic-webfont.woff and /dev/null differ
diff --git a/documentation/fonts/OpenSans-Italic-webfont.eot b/documentation/fonts/OpenSans-Italic-webfont.eot
deleted file mode 100644
index 0c8a0ae0..00000000
Binary files a/documentation/fonts/OpenSans-Italic-webfont.eot and /dev/null differ
diff --git a/documentation/fonts/OpenSans-Italic-webfont.svg b/documentation/fonts/OpenSans-Italic-webfont.svg
deleted file mode 100644
index e1075dcc..00000000
--- a/documentation/fonts/OpenSans-Italic-webfont.svg
+++ /dev/null
@@ -1,1830 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/documentation/fonts/OpenSans-Italic-webfont.woff b/documentation/fonts/OpenSans-Italic-webfont.woff
deleted file mode 100644
index ff652e64..00000000
Binary files a/documentation/fonts/OpenSans-Italic-webfont.woff and /dev/null differ
diff --git a/documentation/fonts/OpenSans-Light-webfont.eot b/documentation/fonts/OpenSans-Light-webfont.eot
deleted file mode 100644
index 14868406..00000000
Binary files a/documentation/fonts/OpenSans-Light-webfont.eot and /dev/null differ
diff --git a/documentation/fonts/OpenSans-Light-webfont.svg b/documentation/fonts/OpenSans-Light-webfont.svg
deleted file mode 100644
index 11a472ca..00000000
--- a/documentation/fonts/OpenSans-Light-webfont.svg
+++ /dev/null
@@ -1,1831 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/documentation/fonts/OpenSans-Light-webfont.woff b/documentation/fonts/OpenSans-Light-webfont.woff
deleted file mode 100644
index e7860748..00000000
Binary files a/documentation/fonts/OpenSans-Light-webfont.woff and /dev/null differ
diff --git a/documentation/fonts/OpenSans-LightItalic-webfont.eot b/documentation/fonts/OpenSans-LightItalic-webfont.eot
deleted file mode 100644
index 8f445929..00000000
Binary files a/documentation/fonts/OpenSans-LightItalic-webfont.eot and /dev/null differ
diff --git a/documentation/fonts/OpenSans-LightItalic-webfont.svg b/documentation/fonts/OpenSans-LightItalic-webfont.svg
deleted file mode 100644
index 431d7e35..00000000
--- a/documentation/fonts/OpenSans-LightItalic-webfont.svg
+++ /dev/null
@@ -1,1835 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/documentation/fonts/OpenSans-LightItalic-webfont.woff b/documentation/fonts/OpenSans-LightItalic-webfont.woff
deleted file mode 100644
index 43e8b9e6..00000000
Binary files a/documentation/fonts/OpenSans-LightItalic-webfont.woff and /dev/null differ
diff --git a/documentation/fonts/OpenSans-Regular-webfont.eot b/documentation/fonts/OpenSans-Regular-webfont.eot
deleted file mode 100644
index 6bbc3cf5..00000000
Binary files a/documentation/fonts/OpenSans-Regular-webfont.eot and /dev/null differ
diff --git a/documentation/fonts/OpenSans-Regular-webfont.svg b/documentation/fonts/OpenSans-Regular-webfont.svg
deleted file mode 100644
index 25a39523..00000000
--- a/documentation/fonts/OpenSans-Regular-webfont.svg
+++ /dev/null
@@ -1,1831 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/documentation/fonts/OpenSans-Regular-webfont.woff b/documentation/fonts/OpenSans-Regular-webfont.woff
deleted file mode 100644
index e231183d..00000000
Binary files a/documentation/fonts/OpenSans-Regular-webfont.woff and /dev/null differ
diff --git a/documentation/global.html b/documentation/global.html
index cf4cae70..3dfb570e 100644
--- a/documentation/global.html
+++ b/documentation/global.html
@@ -29,7 +29,7 @@
@@ -130,6 +130,166 @@ Methods
+ convertMultiWOZInteractor(multiWOZdialogue) → {Array}
+
+
+
+
+
+
+
+
+ - Description:
+ Returns an array of JSON-string "original/simplified format" transcripts from the MultiWOZ dialogue
+uploaded by iterating through the MultiWOZ dialogue array and converting the individual
+transcripts in the array to the simplified format one-by-one.
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ multiWOZdialogue
+
+
+
+
+
+Array
+
+
+
+
+
+
+
+
+
+
+ List of individual MultiWOZ transcripts to be converted to simplified format
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+ multiWOZdialogue - List of simplified transcripts in the "original" format for further processing
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getAllIntentsInteractor(user) → {Object}
@@ -443,7 +603,7 @@ Returns:
- user.intents - The intents identified in user's transcipts.
+ singleTranscript.intents - The intents identified in the transcript requested (if it exists).
@@ -470,7 +630,7 @@ Returns:
- getTranscriptsInteractor(user) → {Object}
+ getTranscriptsInteractor(user) → {mongoose.Schema}
@@ -601,7 +761,7 @@ Returns:
- user.transcripts - The transcripts uploaded by the user
+ user.transcripts - The transcripts uploaded by the user, which is an entity itself.
@@ -612,7 +772,7 @@ Returns:
-Object
+mongoose.Schema
@@ -640,7 +800,7 @@ Description:
Returns a map of the intents of each transcript, and an aggregate
intent list, by reading the intents of the newly uploaded transctipts.
-If an intent doesn't exist in the map yet, adds it; if italready exists,
+If an intent doesn't exist in the map yet, adds it; if it already exists,
updates the frequency. Moreover, keeps track of which intents come after
which intent in what frequency, to identify "intent associates".
@@ -648,7 +808,7 @@ Source:
@@ -824,15 +984,16 @@ <
- Description:
- Returns a map of all processed transcripts and their identified intents
-by reading through the newly uploaded trasnscripts and identifying new
-transcripts using intentIdentifierInteractor
Use Case.
+ Returns a map of all processed transcripts and their identified intents.
+Currently, our processing algorithm iterates through the newly uploaded transcripts and identifies new
+intents using intentIdentifyInteractor
Use Case.
+If we would like to add more processing steps for a transcript in the future, we can easily do so in this file.
- Source:
@@ -1008,16 +1169,23 @@
- Description:
- Processes the transcript that the user has uploaded using
-transcriptProcessInteractor
Use Case, which identifies intents using
-intentIdentifierInteractor
Use Case, and finally saves the transcript
-and the intents to the database.
+ Processes the transcript that the user has uploaded using the convertMultiWOZInteractor
and
+transcriptProcessInteractor
Use Cases (the latter of which identifies intents using the
+intentIdentifierInteractor
Use Case), and saves the transcript
+and the intents to the database.
+Open-Closed Principle: does not modify our existing code-base significantly;
+only extends the functionality by adding step to convert a MultiWOZ transcript before applying the
+original processTranscript function from transcriptProcessor.
+Liskov Substitution Principle: a transcript containing a single conversation is a subtype
+of a transcript containing multiple conversations, so we may upload a transcript containing
+one conversation as a substitute of a typical transcript containing an unknown number of conversations.
+(Technically, LSP has more to do with interfaces and implementation, but it is still relevant here.)
- Source:
@@ -1518,7 +1686,7 @@ Parameters:
diff --git a/documentation/index.html b/documentation/index.html
index 9dd98849..83fc01e0 100644
--- a/documentation/index.html
+++ b/documentation/index.html
@@ -29,7 +29,7 @@
@@ -61,11 +61,33 @@
Intentful
-This is the Techy Blinders' Voiceflow Project! (ft. Berke Altiparmak, Chenika Bukes, Krishna Cheemalapati, Dhairya Khara, Aidan Li)
-Intentful is potentially an add-on feature for Voiceflow to help Voiceflow users set up their environment on the Voiceflow platform faster and smarter.
-Intentful allows you, a retail company, to find out what matters the most to your customers. After uploading your transcripts of conversations between the customers and your chat app, Intentful detects the "intent" (i.e., 'buy pizza') of each human message in your transcript. It keeps track of how many times each intent has occurred in the conversation(s), so that while setting up your Voiceflow environment, you can prioritize those intents to maximize customer utility.
-In addition, Intentful identifies "intent associates": the most frequent intents that come after a specific intent. This helps you build options for conversation logic/flow by letting you know common conversation sequences, and subsequently, you can create more thorough logic for them. For example, 'buy_fries' being the most frequent intent after 'buy_cheeseburger' intent can help you build a chatbot that asks the users whether they would like fries after they mention they want a cheeseburger.
+This is the Techy Blinders' Voiceflow Project!
+Intentful was made to help retail companies turn transcripts into conversational assistants. Intentful is potentially an add-on feature for Voiceflow that helps Voiceflow users set up their environment on the Voiceflow platform faster and smarter.
+Intentful allows you, a retail company, to find out what matters the most to your customers. After uploading your transcripts of conversations between the customers and your chat app, Intentful detects the "intent" (e.g. 'buy_pizza') of each human message in a single transcript. It keeps track of how many times each intent has occurred in the conversation(s), so that while setting up your Voiceflow environment, you can prioritize those intents to maximize customer utility.
+Intentful also identifies "intent associates": the most frequent intents that come after a specific intent. By letting you know the most common conversation sequences, we help you choose better options for building conversation logic/flow with greater depth. For example, if 'buy_fries' is the most frequent intent after the 'buy_cheeseburger' intent, you can build a chatbot that asks the users whether they would like fries after they mention they want a cheeseburger.
Consequently, Intentful is perfect to both get you started on Voiceflow and maximize your experience with Voiceflow.
+Authors
+
+Features
+Landing Page
+
+- Register, Log-in functionality
+- Team Bios
+
+Dashboard
+
+- Upload single or multiple transcripts in a dialogue.json file
+- View previously uploaded transcripts
+- Ability to visualize all intents of an individual transcript, or all intents of all previously uploaded transcripts
+- See an intent's associates and their frequency by clicking on the intent's bubble
+- Create an intent block with that labelled intent on the Voiceflow site using the Modal (by entering Voiceflow info)
+
Getting Started
- Install MongoDB and NodeJS
@@ -75,7 +97,10 @@ Getting Started
- To start the server run
cd server
, npm install
, npm run start
from the root of the project. Note, if you have nodemon
installed, you can also run npm run dev
instead of npm run start
for a better development experience.
If everything is done correctly, you can visit http://localhost:3000/
in your favourite browser to start using the application.
-To run the application in your browser, go to: https://intentful.herokuapp.com/
+To run the application in your browser, go to: https://intentful.herokuapp.com/
+Documentation and Testing
+As Techy Blinders, we invite developers to contribute to the Intentful project. See our documentation for our Use Case Logic at https://intentful-docs.herokuapp.com/
+Testing for all our Use Case Interactors can be found in the server/src/tests folder.
@@ -90,7 +115,7 @@ Getting Started
diff --git a/documentation/styles/jsdoc-default.css b/documentation/styles/jsdoc-default.css
deleted file mode 100644
index 7d1729dc..00000000
--- a/documentation/styles/jsdoc-default.css
+++ /dev/null
@@ -1,358 +0,0 @@
-@font-face {
- font-family: 'Open Sans';
- font-weight: normal;
- font-style: normal;
- src: url('../fonts/OpenSans-Regular-webfont.eot');
- src:
- local('Open Sans'),
- local('OpenSans'),
- url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
- url('../fonts/OpenSans-Regular-webfont.woff') format('woff'),
- url('../fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
-}
-
-@font-face {
- font-family: 'Open Sans Light';
- font-weight: normal;
- font-style: normal;
- src: url('../fonts/OpenSans-Light-webfont.eot');
- src:
- local('Open Sans Light'),
- local('OpenSans Light'),
- url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
- url('../fonts/OpenSans-Light-webfont.woff') format('woff'),
- url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg');
-}
-
-html
-{
- overflow: auto;
- background-color: #fff;
- font-size: 14px;
-}
-
-body
-{
- font-family: 'Open Sans', sans-serif;
- line-height: 1.5;
- color: #4d4e53;
- background-color: white;
-}
-
-a, a:visited, a:active {
- color: #0095dd;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-header
-{
- display: block;
- padding: 0px 4px;
-}
-
-tt, code, kbd, samp {
- font-family: Consolas, Monaco, 'Andale Mono', monospace;
-}
-
-.class-description {
- font-size: 130%;
- line-height: 140%;
- margin-bottom: 1em;
- margin-top: 1em;
-}
-
-.class-description:empty {
- margin: 0;
-}
-
-#main {
- float: left;
- width: 70%;
-}
-
-article dl {
- margin-bottom: 40px;
-}
-
-article img {
- max-width: 100%;
-}
-
-section
-{
- display: block;
- background-color: #fff;
- padding: 12px 24px;
- border-bottom: 1px solid #ccc;
- margin-right: 30px;
-}
-
-.variation {
- display: none;
-}
-
-.signature-attributes {
- font-size: 60%;
- color: #aaa;
- font-style: italic;
- font-weight: lighter;
-}
-
-nav
-{
- display: block;
- float: right;
- margin-top: 28px;
- width: 30%;
- box-sizing: border-box;
- border-left: 1px solid #ccc;
- padding-left: 16px;
-}
-
-nav ul {
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
- font-size: 100%;
- line-height: 17px;
- padding: 0;
- margin: 0;
- list-style-type: none;
-}
-
-nav ul a, nav ul a:visited, nav ul a:active {
- font-family: Consolas, Monaco, 'Andale Mono', monospace;
- line-height: 18px;
- color: #4D4E53;
-}
-
-nav h3 {
- margin-top: 12px;
-}
-
-nav li {
- margin-top: 6px;
-}
-
-footer {
- display: block;
- padding: 6px;
- margin-top: 12px;
- font-style: italic;
- font-size: 90%;
-}
-
-h1, h2, h3, h4 {
- font-weight: 200;
- margin: 0;
-}
-
-h1
-{
- font-family: 'Open Sans Light', sans-serif;
- font-size: 48px;
- letter-spacing: -2px;
- margin: 12px 24px 20px;
-}
-
-h2, h3.subsection-title
-{
- font-size: 30px;
- font-weight: 700;
- letter-spacing: -1px;
- margin-bottom: 12px;
-}
-
-h3
-{
- font-size: 24px;
- letter-spacing: -0.5px;
- margin-bottom: 12px;
-}
-
-h4
-{
- font-size: 18px;
- letter-spacing: -0.33px;
- margin-bottom: 12px;
- color: #4d4e53;
-}
-
-h5, .container-overview .subsection-title
-{
- font-size: 120%;
- font-weight: bold;
- letter-spacing: -0.01em;
- margin: 8px 0 3px 0;
-}
-
-h6
-{
- font-size: 100%;
- letter-spacing: -0.01em;
- margin: 6px 0 3px 0;
- font-style: italic;
-}
-
-table
-{
- border-spacing: 0;
- border: 0;
- border-collapse: collapse;
-}
-
-td, th
-{
- border: 1px solid #ddd;
- margin: 0px;
- text-align: left;
- vertical-align: top;
- padding: 4px 6px;
- display: table-cell;
-}
-
-thead tr
-{
- background-color: #ddd;
- font-weight: bold;
-}
-
-th { border-right: 1px solid #aaa; }
-tr > th:last-child { border-right: 1px solid #ddd; }
-
-.ancestors, .attribs { color: #999; }
-.ancestors a, .attribs a
-{
- color: #999 !important;
- text-decoration: none;
-}
-
-.clear
-{
- clear: both;
-}
-
-.important
-{
- font-weight: bold;
- color: #950B02;
-}
-
-.yes-def {
- text-indent: -1000px;
-}
-
-.type-signature {
- color: #aaa;
-}
-
-.name, .signature {
- font-family: Consolas, Monaco, 'Andale Mono', monospace;
-}
-
-.details { margin-top: 14px; border-left: 2px solid #DDD; }
-.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; }
-.details dd { margin-left: 70px; }
-.details ul { margin: 0; }
-.details ul { list-style-type: none; }
-.details li { margin-left: 30px; padding-top: 6px; }
-.details pre.prettyprint { margin: 0 }
-.details .object-value { padding-top: 0; }
-
-.description {
- margin-bottom: 1em;
- margin-top: 1em;
-}
-
-.code-caption
-{
- font-style: italic;
- font-size: 107%;
- margin: 0;
-}
-
-.source
-{
- border: 1px solid #ddd;
- width: 80%;
- overflow: auto;
-}
-
-.prettyprint.source {
- width: inherit;
-}
-
-.source code
-{
- font-size: 100%;
- line-height: 18px;
- display: block;
- padding: 4px 12px;
- margin: 0;
- background-color: #fff;
- color: #4D4E53;
-}
-
-.prettyprint code span.line
-{
- display: inline-block;
-}
-
-.prettyprint.linenums
-{
- padding-left: 70px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.prettyprint.linenums ol
-{
- padding-left: 0;
-}
-
-.prettyprint.linenums li
-{
- border-left: 3px #ddd solid;
-}
-
-.prettyprint.linenums li.selected,
-.prettyprint.linenums li.selected *
-{
- background-color: lightyellow;
-}
-
-.prettyprint.linenums li *
-{
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- user-select: text;
-}
-
-.params .name, .props .name, .name code {
- color: #4D4E53;
- font-family: Consolas, Monaco, 'Andale Mono', monospace;
- font-size: 100%;
-}
-
-.params td.description > p:first-child,
-.props td.description > p:first-child
-{
- margin-top: 0;
- padding-top: 0;
-}
-
-.params td.description > p:last-child,
-.props td.description > p:last-child
-{
- margin-bottom: 0;
- padding-bottom: 0;
-}
-
-.disabled {
- color: #454545;
-}
diff --git a/documentation/styles/prettify-jsdoc.css b/documentation/styles/prettify-jsdoc.css
deleted file mode 100644
index 5a2526e3..00000000
--- a/documentation/styles/prettify-jsdoc.css
+++ /dev/null
@@ -1,111 +0,0 @@
-/* JSDoc prettify.js theme */
-
-/* plain text */
-.pln {
- color: #000000;
- font-weight: normal;
- font-style: normal;
-}
-
-/* string content */
-.str {
- color: #006400;
- font-weight: normal;
- font-style: normal;
-}
-
-/* a keyword */
-.kwd {
- color: #000000;
- font-weight: bold;
- font-style: normal;
-}
-
-/* a comment */
-.com {
- font-weight: normal;
- font-style: italic;
-}
-
-/* a type name */
-.typ {
- color: #000000;
- font-weight: normal;
- font-style: normal;
-}
-
-/* a literal value */
-.lit {
- color: #006400;
- font-weight: normal;
- font-style: normal;
-}
-
-/* punctuation */
-.pun {
- color: #000000;
- font-weight: bold;
- font-style: normal;
-}
-
-/* lisp open bracket */
-.opn {
- color: #000000;
- font-weight: bold;
- font-style: normal;
-}
-
-/* lisp close bracket */
-.clo {
- color: #000000;
- font-weight: bold;
- font-style: normal;
-}
-
-/* a markup tag name */
-.tag {
- color: #006400;
- font-weight: normal;
- font-style: normal;
-}
-
-/* a markup attribute name */
-.atn {
- color: #006400;
- font-weight: normal;
- font-style: normal;
-}
-
-/* a markup attribute value */
-.atv {
- color: #006400;
- font-weight: normal;
- font-style: normal;
-}
-
-/* a declaration */
-.dec {
- color: #000000;
- font-weight: bold;
- font-style: normal;
-}
-
-/* a variable name */
-.var {
- color: #000000;
- font-weight: normal;
- font-style: normal;
-}
-
-/* a function name */
-.fun {
- color: #000000;
- font-weight: bold;
- font-style: normal;
-}
-
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums {
- margin-top: 0;
- margin-bottom: 0;
-}
diff --git a/documentation/styles/prettify-tomorrow.css b/documentation/styles/prettify-tomorrow.css
deleted file mode 100644
index b6f92a78..00000000
--- a/documentation/styles/prettify-tomorrow.css
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Tomorrow Theme */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* Pretty printing styles. Used with prettify.js. */
-/* SPAN elements with the classes below are added by prettyprint. */
-/* plain text */
-.pln {
- color: #4d4d4c; }
-
-@media screen {
- /* string content */
- .str {
- color: #718c00; }
-
- /* a keyword */
- .kwd {
- color: #8959a8; }
-
- /* a comment */
- .com {
- color: #8e908c; }
-
- /* a type name */
- .typ {
- color: #4271ae; }
-
- /* a literal value */
- .lit {
- color: #f5871f; }
-
- /* punctuation */
- .pun {
- color: #4d4d4c; }
-
- /* lisp open bracket */
- .opn {
- color: #4d4d4c; }
-
- /* lisp close bracket */
- .clo {
- color: #4d4d4c; }
-
- /* a markup tag name */
- .tag {
- color: #c82829; }
-
- /* a markup attribute name */
- .atn {
- color: #f5871f; }
-
- /* a markup attribute value */
- .atv {
- color: #3e999f; }
-
- /* a declaration */
- .dec {
- color: #f5871f; }
-
- /* a variable name */
- .var {
- color: #c82829; }
-
- /* a function name */
- .fun {
- color: #4271ae; } }
-/* Use higher contrast and text-weight for printable form. */
-@media print, projection {
- .str {
- color: #060; }
-
- .kwd {
- color: #006;
- font-weight: bold; }
-
- .com {
- color: #600;
- font-style: italic; }
-
- .typ {
- color: #404;
- font-weight: bold; }
-
- .lit {
- color: #044; }
-
- .pun, .opn, .clo {
- color: #440; }
-
- .tag {
- color: #006;
- font-weight: bold; }
-
- .atn {
- color: #404; }
-
- .atv {
- color: #060; } }
-/* Style */
-/*
-pre.prettyprint {
- background: white;
- font-family: Consolas, Monaco, 'Andale Mono', monospace;
- font-size: 12px;
- line-height: 1.5;
- border: 1px solid #ccc;
- padding: 10px; }
-*/
-
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums {
- margin-top: 0;
- margin-bottom: 0; }
-
-/* IE indents via margin-left */
-li.L0,
-li.L1,
-li.L2,
-li.L3,
-li.L4,
-li.L5,
-li.L6,
-li.L7,
-li.L8,
-li.L9 {
- /* */ }
-
-/* Alternate shading for lines */
-li.L1,
-li.L3,
-li.L5,
-li.L7,
-li.L9 {
- /* */ }
diff --git a/server/docs/GetUseCases_getAllIntentsInteractor.js.html b/server/docs/GetUseCases_getAllIntentsInteractor.js.html
deleted file mode 100644
index 3ef20214..00000000
--- a/server/docs/GetUseCases_getAllIntentsInteractor.js.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
- GetUseCases/getAllIntentsInteractor.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GetUseCases/getAllIntentsInteractor.js
-
-
-
-
-
-
-
-
-
- /**
- * Returns the intents of the user.
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website
- * @returns {Object} user.intents - intents identified in user's transcipts.
- */
-const getAllIntentsInteractor = (user) =>{
- return user.intents
-}
-
-module.exports = getAllIntentsInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/server/docs/GetUseCases_getSpecificIntentsInteractor.js.html b/server/docs/GetUseCases_getSpecificIntentsInteractor.js.html
deleted file mode 100644
index 2bb35716..00000000
--- a/server/docs/GetUseCases_getSpecificIntentsInteractor.js.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
- GetUseCases/getSpecificIntentsInteractor.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GetUseCases/getSpecificIntentsInteractor.js
-
-
-
-
-
-
-
-
-
- /**
- * Returns the intents of the single transcript requested by the user.
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website.
- * @param {String} name - Name of the transcript file requested by the user.
- * @returns {Object} singleTranscript.intents - The intents identified in the transcript requested (if it exists).
- */
-const getSpecificIntentsInteractor = (user, name) => {
- const allUserTranscripts = user.transcripts
- for (const singleTranscript of allUserTranscripts) {
- if (singleTranscript.filename === name) {
- return singleTranscript.intents
- }
- }
- return "No intents"
-}
-
-module.exports = getSpecificIntentsInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/server/docs/GetUseCases_getTranscriptsInteractor.js.html b/server/docs/GetUseCases_getTranscriptsInteractor.js.html
deleted file mode 100644
index 39f48f72..00000000
--- a/server/docs/GetUseCases_getTranscriptsInteractor.js.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
- GetUseCases/getTranscriptsInteractor.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GetUseCases/getTranscriptsInteractor.js
-
-
-
-
-
-
-
-
-
- /**
- * Returns all the transcripts uploaded by the user.
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website.
- * @returns {mongoose.Schema} user.transcripts - The transcripts uploaded by the user, which is an entity itself.
- */
-const getTranscriptsInteractor = (user) => {
- if (user.transcripts !== undefined) {
- return user.transcripts
- }
- return 'user not a valid User model or user does not have transcripts property';
-}
-
-module.exports = getTranscriptsInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/server/docs/TranscriptUseCases_intentIdentifyInteractor.js.html b/server/docs/TranscriptUseCases_intentIdentifyInteractor.js.html
deleted file mode 100644
index 68866340..00000000
--- a/server/docs/TranscriptUseCases_intentIdentifyInteractor.js.html
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
- TranscriptUseCases/intentIdentifyInteractor.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TranscriptUseCases/intentIdentifyInteractor.js
-
-
-
-
-
-
-
-
-
- /**
- * Returns a map of the intents of each transcript, and an aggregate
- * intent list, by reading the intents of the newly uploaded transctipts.
- * If an intent doesn't exist in the map yet, adds it; if it already exists,
- * updates the frequency. Moreover, keeps track of which intents come after
- * which intent in what frequency, to identify "intent associates".
- * @interactor
- * @param {Object} existingProcessedMap - Map of already processed transcripts with their intents.
- * @param {Array} transcript_json_list - List of transcripts to be uploaded
- * @return {Map} processedMap - Map of all processed transcripts of user and their intents.
- */
-function intentIdentifyInteractor(existingProcessedMap, transcript_json_list) {
- let processedMap = new Map(existingProcessedMap)
-
- for (const transcript_json of transcript_json_list) {
- processSingleTranscript(transcript_json, processedMap);
- }
- return processedMap
-
-}
-
-function processSingleTranscript(transcript_json, processedMap) {
- let prevIntent = undefined; // initialize
-
- // iterate over each message in a single transcript
- for (let i = 0; i < transcript_json.length; i++) {
- let message = transcript_json[i];
-
- // some intents have multiple intents, so we iterate through that as well
- for (const intent of message.intents) {
- // update intent frequency in the processed map
- updateIntentInProcessedMap(intent);
-
- // update intent associates of the previous intent
- if (prevIntent !== undefined && prevIntent !== intent) {
- updateAssociateInProcessedMap(prevIntent, intent);
- }
- prevIntent = intent;
- }
- }
-
- // update intent frequency in the processed map
- function updateIntentInProcessedMap(intent) {
- // if intent doesn't exist, add it
- if (!processedMap.has(intent)) {
- processedMap.set(intent, [1, new Map()]);
- }
-
- // if the intent exists, update its frequency
- else {
- const currList = processedMap.get(intent);
- const newIntentFreq = currList[0] + 1;
- const sameAssociateMap = currList[1];
-
- processedMap.set(intent, [newIntentFreq, sameAssociateMap]);
- }
- }
-
- // update intent associates of the previous intent
- function updateAssociateInProcessedMap(prevIntent, intent) {
- // get current intent associates
- const currList = processedMap.get(prevIntent);
- let newAssociateMap = undefined;
- if (currList[1] instanceof Map) {
- newAssociateMap = currList[1];
- }
- else {
- newAssociateMap = new Map(Object.entries(currList[1]));
- }
-
- //if current intent is not an associate of the previous intent, make it so
- if (!newAssociateMap.has(intent)) {
- newAssociateMap.set(intent, 1);
- }
-
- //if current intent is an associate of the previous intent, update its frequency
- else {
- const newIntentAssociateFreq = newAssociateMap.get(intent) + 1;
- newAssociateMap.set(intent, newIntentAssociateFreq);
- }
- currList[1] = newAssociateMap;
- }
-}
-
-module.exports = intentIdentifyInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/server/docs/TranscriptUseCases_transcriptProcessInteractor.js.html b/server/docs/TranscriptUseCases_transcriptProcessInteractor.js.html
deleted file mode 100644
index ac848e68..00000000
--- a/server/docs/TranscriptUseCases_transcriptProcessInteractor.js.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
- TranscriptUseCases/transcriptProcessInteractor.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TranscriptUseCases/transcriptProcessInteractor.js
-
-
-
-
-
-
-
-
-
- const intentIdentifyInteractor = require('./intentIdentifyInteractor')
-
-/**
- * Returns a map of all processed transcripts and their identified intents.
- * Currently, our processing algorithm iterates through the newly uploaded transcripts and identifies new
- * intents using {@link intentIdentifyInteractor} Use Case.
- * If we would like to add more processing steps for a transcript in the future, we can easily do so in this file.
- * @interactor
- * @param {Object} existingProcessedMap - Map of already processed transcripts with their intents.
- * @param {Array} transcript_json_list - List of transcripts to be uploaded
- * @return {Map} allCurrentIntents - Map of all processed transcripts (uploaded by user) and their intents.
- */
-const transcriptProcessInteractor = (existingProcessedMap, transcript_json_list) => {
- const allCurrentIntents = intentIdentifyInteractor(existingProcessedMap, transcript_json_list)
- return allCurrentIntents
-}
-
-module.exports = transcriptProcessInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/server/docs/TranscriptUseCases_transcriptUploadInteractor.js.html b/server/docs/TranscriptUseCases_transcriptUploadInteractor.js.html
deleted file mode 100644
index 80dc5aea..00000000
--- a/server/docs/TranscriptUseCases_transcriptUploadInteractor.js.html
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
- TranscriptUseCases/transcriptUploadInteractor.js - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TranscriptUseCases/transcriptUploadInteractor.js
-
-
-
-
-
-
-
-
-
- const transcriptProcessInteractor = require('./transcriptProcessInteractor')
-const convertMultiWOZInteractor = require('./convertMultiWOZInteractor')
-
-/**
- * Processes the transcript that the user has uploaded using the {@link convertMultiWOZInteractor} and
- * {@link transcriptProcessInteractor} Use Cases (the latter of which identifies intents using the
- * {@link intentIdentifierInteractor} Use Case), and saves the transcript
- * and the intents to the database.
- * Open-Closed Principle: does not modify our existing code-base significantly;
- * only extends the functionality by adding step to convert a MultiWOZ transcript before applying the
- * original processTranscript function from transcriptProcessor.
- * Liskov Substitution Principle: a transcript containing a single conversation is a subtype
- * of a transcript containing multiple conversations, so we may upload a transcript containing
- * one conversation as a substitute of a typical transcript containing an unknown number of conversations.
- * (Technically, LSP has more to do with interfaces and implementation, but it is still relevant here.)
- * @interactor
- * @param {mongoose.Schema} user - The current authorized user of the website
- * @param {JSON} file - The JSON transcript file that the user has uploaded
- * @param {String} filename - Name of the file the user has uploaded
- */
-const transcriptUploadInteractor = async (user, file, filename) => {
- //throw an error if not a valid user
- if (user.transcripts === undefined || user.email === undefined) {
- throw new Error("Not a valid user")
- }
-
- // This checks the name of the newly uploaded file doesn't exist in database
- // i.e., make sure its name is unique
- let transcriptNames = []
- const existingTranscriptInfo = user.transcripts
- try {
- existingTranscriptInfo.forEach(info => {
- transcriptNames.push(info.filename)
- })
- }
- catch (e) {
- throw new Error("Error in retrieving transcript names", e)
- }
- // confirm the filename is unique, or send an error
- if (!transcriptNames.includes(filename)) {
- userSaveTranscriptAndIntents()
- }
- else {
- throw new Error("A transcript with the same name already exists")
- }
-
- // use other use cases to identify intents and save the transcript and intents
- async function userSaveTranscriptAndIntents() {
- //retrieve existing transcript information (i.e., identified intents)
- const json = JSON.parse(file)
- let convertedMultiWOZtoOrigList = convertMultiWOZInteractor(json);
-
- // prepare allCurrentIntents variable representing user's existing intents (if they have any)
- let allCurrentIntents = new Map()
- if (user.intents !== undefined) {
- allCurrentIntents = new Map(Object.entries(user.intents))
- }
-
- for (let i = 0; i < convertedMultiWOZtoOrigList.length; i++) {
- let currTranscript = convertedMultiWOZtoOrigList[i] // originally a string
- currTranscript = JSON.parse(currTranscript) // now a JSON object
-
- // single transcript processing; get intents in the newly uploaded files
- let intentsForThisFile = transcriptProcessInteractor(new Map(), [currTranscript])
-
- // multiple transcript processing
- allCurrentIntents = transcriptProcessInteractor(allCurrentIntents, [currTranscript])
-
- addTranscriptToUser(i, intentsForThisFile)
- user.intents = allCurrentIntents // overwrite user's intents with the current intents
- }
-
- try {
- await user.save()
- }
- catch (e) {
- throw new Error("Error in saving intents", e)
- }
-
- function addTranscriptToUser(i, intentsForThisFile) {
- try {
- const obj = {}
- let currTranscriptFilename = filename
- if (i !== 0) {
- currTranscriptFilename = currTranscriptFilename + `_${i}`
- }
- obj["file"] = file
- obj["intents"] = intentsForThisFile
- obj["filename"] = currTranscriptFilename
- user.transcripts = user.transcripts.concat(obj)
- }
- catch (e) {
- throw new Error("Error in saving transcripts", e)
- }
- }
- }
-}
-
-module.exports = transcriptUploadInteractor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/server/docs/fonts/Montserrat/Montserrat-Bold.eot b/server/docs/fonts/Montserrat/Montserrat-Bold.eot
deleted file mode 100644
index f2970bbd..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Bold.eot and /dev/null differ
diff --git a/server/docs/fonts/Montserrat/Montserrat-Bold.ttf b/server/docs/fonts/Montserrat/Montserrat-Bold.ttf
deleted file mode 100644
index 3bfd79b6..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Bold.ttf and /dev/null differ
diff --git a/server/docs/fonts/Montserrat/Montserrat-Bold.woff b/server/docs/fonts/Montserrat/Montserrat-Bold.woff
deleted file mode 100644
index 92607654..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Bold.woff and /dev/null differ
diff --git a/server/docs/fonts/Montserrat/Montserrat-Bold.woff2 b/server/docs/fonts/Montserrat/Montserrat-Bold.woff2
deleted file mode 100644
index d9940cd1..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Bold.woff2 and /dev/null differ
diff --git a/server/docs/fonts/Montserrat/Montserrat-Regular.eot b/server/docs/fonts/Montserrat/Montserrat-Regular.eot
deleted file mode 100644
index 735d12b5..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Regular.eot and /dev/null differ
diff --git a/server/docs/fonts/Montserrat/Montserrat-Regular.ttf b/server/docs/fonts/Montserrat/Montserrat-Regular.ttf
deleted file mode 100644
index 5da852a3..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Regular.ttf and /dev/null differ
diff --git a/server/docs/fonts/Montserrat/Montserrat-Regular.woff b/server/docs/fonts/Montserrat/Montserrat-Regular.woff
deleted file mode 100644
index bf918327..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Regular.woff and /dev/null differ
diff --git a/server/docs/fonts/Montserrat/Montserrat-Regular.woff2 b/server/docs/fonts/Montserrat/Montserrat-Regular.woff2
deleted file mode 100644
index 72d13c60..00000000
Binary files a/server/docs/fonts/Montserrat/Montserrat-Regular.woff2 and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot
deleted file mode 100644
index 0f24510b..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg
deleted file mode 100644
index 5384f985..00000000
--- a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg
+++ /dev/null
@@ -1,978 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf
deleted file mode 100644
index e6c158c2..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff
deleted file mode 100644
index d0a1c292..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2
deleted file mode 100644
index d2869749..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot
deleted file mode 100644
index b4204488..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg
deleted file mode 100644
index dee0949f..00000000
--- a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg
+++ /dev/null
@@ -1,1049 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf
deleted file mode 100644
index 4d56c337..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff
deleted file mode 100644
index 4681019d..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff and /dev/null differ
diff --git a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 b/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2
deleted file mode 100644
index 8ddcae37..00000000
Binary files a/server/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 and /dev/null differ
diff --git a/server/docs/global.html b/server/docs/global.html
deleted file mode 100644
index 3dfb570e..00000000
--- a/server/docs/global.html
+++ /dev/null
@@ -1,1699 +0,0 @@
-
-
-
-
-
- Global - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Global
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Methods
-
-
-
-
-
-
- convertMultiWOZInteractor(multiWOZdialogue) → {Array}
-
-
-
-
-
-
-
-
- - Description:
- Returns an array of JSON-string "original/simplified format" transcripts from the MultiWOZ dialogue
-uploaded by iterating through the MultiWOZ dialogue array and converting the individual
-transcripts in the array to the simplified format one-by-one.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- multiWOZdialogue
-
-
-
-
-
-Array
-
-
-
-
-
-
-
-
-
-
- List of individual MultiWOZ transcripts to be converted to simplified format
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- multiWOZdialogue - List of simplified transcripts in the "original" format for further processing
-
-
-
-
-
- -
- Type
-
- -
-
-Array
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getAllIntentsInteractor(user) → {Object}
-
-
-
-
-
-
-
-
- - Description:
- Returns the intents of the user.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- user.intents - intents identified in user's transcipts.
-
-
-
-
-
- -
- Type
-
- -
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getSpecificIntentsInteractor(user, name) → {Object}
-
-
-
-
-
-
-
-
- - Description:
- Returns the intents of the single transcript requested by the user.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website.
-
-
-
-
-
-
- name
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Name of the transcript file requested by the user.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- singleTranscript.intents - The intents identified in the transcript requested (if it exists).
-
-
-
-
-
- -
- Type
-
- -
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getTranscriptsInteractor(user) → {mongoose.Schema}
-
-
-
-
-
-
-
-
- - Description:
- Returns all the transcripts uploaded by the user.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- user.transcripts - The transcripts uploaded by the user, which is an entity itself.
-
-
-
-
-
- -
- Type
-
- -
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- intentIdentifyInteractor(existingProcessedMap, transcript_json_list) → {Map}
-
-
-
-
-
-
-
-
- - Description:
- Returns a map of the intents of each transcript, and an aggregate
-intent list, by reading the intents of the newly uploaded transctipts.
-If an intent doesn't exist in the map yet, adds it; if it already exists,
-updates the frequency. Moreover, keeps track of which intents come after
-which intent in what frequency, to identify "intent associates".
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- existingProcessedMap
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
- Map of already processed transcripts with their intents.
-
-
-
-
-
-
- transcript_json_list
-
-
-
-
-
-Array
-
-
-
-
-
-
-
-
-
-
- List of transcripts to be uploaded
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- processedMap - Map of all processed transcripts of user and their intents.
-
-
-
-
-
- -
- Type
-
- -
-
-Map
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- transcriptProcessInteractor(existingProcessedMap, transcript_json_list) → {Map}
-
-
-
-
-
-
-
-
- - Description:
- Returns a map of all processed transcripts and their identified intents.
-Currently, our processing algorithm iterates through the newly uploaded transcripts and identifies new
-intents using intentIdentifyInteractor
Use Case.
-If we would like to add more processing steps for a transcript in the future, we can easily do so in this file.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- existingProcessedMap
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
- Map of already processed transcripts with their intents.
-
-
-
-
-
-
- transcript_json_list
-
-
-
-
-
-Array
-
-
-
-
-
-
-
-
-
-
- List of transcripts to be uploaded
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- allCurrentIntents - Map of all processed transcripts (uploaded by user) and their intents.
-
-
-
-
-
- -
- Type
-
- -
-
-Map
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (async) transcriptUploadInteractor(user, file, filename)
-
-
-
-
-
-
-
-
- - Description:
- Processes the transcript that the user has uploaded using the convertMultiWOZInteractor
and
-transcriptProcessInteractor
Use Cases (the latter of which identifies intents using the
-intentIdentifierInteractor
Use Case), and saves the transcript
-and the intents to the database.
-Open-Closed Principle: does not modify our existing code-base significantly;
-only extends the functionality by adding step to convert a MultiWOZ transcript before applying the
-original processTranscript function from transcriptProcessor.
-Liskov Substitution Principle: a transcript containing a single conversation is a subtype
-of a transcript containing multiple conversations, so we may upload a transcript containing
-one conversation as a substitute of a typical transcript containing an unknown number of conversations.
-(Technically, LSP has more to do with interfaces and implementation, but it is still relevant here.)
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website
-
-
-
-
-
-
- file
-
-
-
-
-
-JSON
-
-
-
-
-
-
-
-
-
-
- The JSON transcript file that the user has uploaded
-
-
-
-
-
-
- filename
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Name of the file the user has uploaded
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (async) userLoginInteractor(email, password)
-
-
-
-
-
-
-
-
- - Description:
- Checks if email and password combination exists in the database,
-and if it does, logs the user in.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- email
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The email given by the user
-
-
-
-
-
-
- password
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The password chosen by the user
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (async) userRegisterInteractor(email, password)
-
-
-
-
-
-
-
-
- - Description:
- Creates the user and registers it to the database.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- email
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The email given by the user
-
-
-
-
-
-
- password
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The password chosen by the user
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/server/docs/index.html b/server/docs/index.html
deleted file mode 100644
index 83fc01e0..00000000
--- a/server/docs/index.html
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
- Home - Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Intentful
-This is the Techy Blinders' Voiceflow Project!
-Intentful was made to help retail companies turn transcripts into conversational assistants. Intentful is potentially an add-on feature for Voiceflow that helps Voiceflow users set up their environment on the Voiceflow platform faster and smarter.
-Intentful allows you, a retail company, to find out what matters the most to your customers. After uploading your transcripts of conversations between the customers and your chat app, Intentful detects the "intent" (e.g. 'buy_pizza') of each human message in a single transcript. It keeps track of how many times each intent has occurred in the conversation(s), so that while setting up your Voiceflow environment, you can prioritize those intents to maximize customer utility.
-Intentful also identifies "intent associates": the most frequent intents that come after a specific intent. By letting you know the most common conversation sequences, we help you choose better options for building conversation logic/flow with greater depth. For example, if 'buy_fries' is the most frequent intent after the 'buy_cheeseburger' intent, you can build a chatbot that asks the users whether they would like fries after they mention they want a cheeseburger.
-Consequently, Intentful is perfect to both get you started on Voiceflow and maximize your experience with Voiceflow.
-Authors
-
-Features
-Landing Page
-
-- Register, Log-in functionality
-- Team Bios
-
-Dashboard
-
-- Upload single or multiple transcripts in a dialogue.json file
-- View previously uploaded transcripts
-- Ability to visualize all intents of an individual transcript, or all intents of all previously uploaded transcripts
-- See an intent's associates and their frequency by clicking on the intent's bubble
-- Create an intent block with that labelled intent on the Voiceflow site using the Modal (by entering Voiceflow info)
-
-Getting Started
-
-- Install MongoDB and NodeJS
-- Clone the repo
-- Start MongoDB on port 27017 (the default MongoDB port)
-- To start the client run
cd client
, npm install
, npm run start
from the root of the project.
-- To start the server run
cd server
, npm install
, npm run start
from the root of the project. Note, if you have nodemon
installed, you can also run npm run dev
instead of npm run start
for a better development experience.
-
-If everything is done correctly, you can visit http://localhost:3000/
in your favourite browser to start using the application.
-To run the application in your browser, go to: https://intentful.herokuapp.com/
-Documentation and Testing
-As Techy Blinders, we invite developers to contribute to the Intentful project. See our documentation for our Use Case Logic at https://intentful-docs.herokuapp.com/
-Testing for all our Use Case Interactors can be found in the server/src/tests folder.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/server/docs/scripts/collapse.js b/server/docs/scripts/collapse.js
deleted file mode 100644
index 4e63926d..00000000
--- a/server/docs/scripts/collapse.js
+++ /dev/null
@@ -1,39 +0,0 @@
-function hideAllButCurrent(){
- //by default all submenut items are hidden
- //but we need to rehide them for search
- document.querySelectorAll("nav > ul").forEach(function(parent) {
- if (parent.className.indexOf("collapse_top") !== -1) {
- parent.style.display = "none";
- }
- });
- document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) {
- parent.style.display = "none";
- });
- document.querySelectorAll("nav > h3").forEach(function(section) {
- if (section.className.indexOf("collapsed_header") !== -1) {
- section.addEventListener("click", function(){
- if (section.nextSibling.style.display === "none") {
- section.nextSibling.style.display = "block";
- } else {
- section.nextSibling.style.display = "none";
- }
- });
- }
- });
-
- //only current page (if it exists) should be opened
- var file = window.location.pathname.split("/").pop().replace(/\.html/, '');
- document.querySelectorAll("nav > ul > li > a").forEach(function(parent) {
- var href = parent.attributes.href.value.replace(/\.html/, '');
- if (file === href) {
- if (parent.parentNode.parentNode.className.indexOf("collapse_top") !== -1) {
- parent.parentNode.parentNode.style.display = "block";
- }
- parent.parentNode.querySelectorAll("ul li").forEach(function(elem) {
- elem.style.display = "block";
- });
- }
- });
-}
-
-hideAllButCurrent();
\ No newline at end of file
diff --git a/server/docs/scripts/commonNav.js b/server/docs/scripts/commonNav.js
deleted file mode 100644
index 03e82028..00000000
--- a/server/docs/scripts/commonNav.js
+++ /dev/null
@@ -1,28 +0,0 @@
-if (typeof fetch === 'function') {
- const init = () => {
- if (typeof scrollToNavItem !== 'function') return false
- scrollToNavItem()
- // hideAllButCurrent not always loaded
- if (typeof hideAllButCurrent === 'function') hideAllButCurrent()
- return true
- }
- fetch('./nav.inc.html')
- .then(response => response.ok ? response.text() : `${response.url} => ${response.status} ${response.statusText}`)
- .then(body => {
- document.querySelector('nav').innerHTML += body
- // nav.js should be quicker to load than nav.inc.html, a fallback just in case
- return init()
- })
- .then(done => {
- if (done) return
- let i = 0
- ;(function waitUntilNavJs () {
- if (init()) return
- if (i++ < 100) return setTimeout(waitUntilNavJs, 300)
- console.error(Error('nav.js not loaded after 30s waiting for it'))
- })()
- })
- .catch(error => console.error(error))
-} else {
- console.error(Error('Browser too old to display commonNav (remove commonNav docdash option)'))
-}
diff --git a/server/docs/scripts/linenumber.js b/server/docs/scripts/linenumber.js
deleted file mode 100644
index 8d52f7ea..00000000
--- a/server/docs/scripts/linenumber.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*global document */
-(function() {
- var source = document.getElementsByClassName('prettyprint source linenums');
- var i = 0;
- var lineNumber = 0;
- var lineId;
- var lines;
- var totalLines;
- var anchorHash;
-
- if (source && source[0]) {
- anchorHash = document.location.hash.substring(1);
- lines = source[0].getElementsByTagName('li');
- totalLines = lines.length;
-
- for (; i < totalLines; i++) {
- lineNumber++;
- lineId = 'line' + lineNumber;
- lines[i].id = lineId;
- if (lineId === anchorHash) {
- lines[i].className += ' selected';
- }
- }
- }
-})();
diff --git a/server/docs/scripts/nav.js b/server/docs/scripts/nav.js
deleted file mode 100644
index 6dd83134..00000000
--- a/server/docs/scripts/nav.js
+++ /dev/null
@@ -1,12 +0,0 @@
-function scrollToNavItem() {
- var path = window.location.href.split('/').pop().replace(/\.html/, '');
- document.querySelectorAll('nav a').forEach(function(link) {
- var href = link.attributes.href.value.replace(/\.html/, '');
- if (path === href) {
- link.scrollIntoView({block: 'center'});
- return;
- }
- })
- }
-
- scrollToNavItem();
diff --git a/server/docs/scripts/polyfill.js b/server/docs/scripts/polyfill.js
deleted file mode 100644
index 44b4c92d..00000000
--- a/server/docs/scripts/polyfill.js
+++ /dev/null
@@ -1,4 +0,0 @@
-//IE Fix, src: https://www.reddit.com/r/programminghorror/comments/6abmcr/nodelist_lacks_foreach_in_internet_explorer/
-if (typeof(NodeList.prototype.forEach)!==typeof(alert)){
- NodeList.prototype.forEach=Array.prototype.forEach;
-}
\ No newline at end of file
diff --git a/server/docs/scripts/prettify/Apache-License-2.0.txt b/server/docs/scripts/prettify/Apache-License-2.0.txt
deleted file mode 100644
index d6456956..00000000
--- a/server/docs/scripts/prettify/Apache-License-2.0.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/server/docs/scripts/prettify/lang-css.js b/server/docs/scripts/prettify/lang-css.js
deleted file mode 100644
index 041e1f59..00000000
--- a/server/docs/scripts/prettify/lang-css.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
-/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
diff --git a/server/docs/scripts/prettify/prettify.js b/server/docs/scripts/prettify/prettify.js
deleted file mode 100644
index eef5ad7e..00000000
--- a/server/docs/scripts/prettify/prettify.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
-(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
-[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
-l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
-q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
-q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
-"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
-a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
-for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
-"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
-H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
-J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
-I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Global
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Methods
-
-
-
-
-
-
- convertMultiWOZInteractor(multiWOZdialogue) → {Array}
-
-
-
-
-
-
-
-
- - Description:
- Returns an array of JSON-string "original/simplified format" transcripts from the MultiWOZ dialogue
-uploaded by iterating through the MultiWOZ dialogue array and converting the individual
-transcripts in the array to the simplified format one-by-one.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- multiWOZdialogue
-
-
-
-
-
-Array
-
-
-
-
-
-
-
-
-
-
- List of individual MultiWOZ transcripts to be converted to simplified format
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- multiWOZdialogue - List of simplified transcripts in the "original" format for further processing
-
-
-
-
-
- -
- Type
-
- -
-
-Array
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getAllIntentsInteractor(user) → {Object}
-
-
-
-
-
-
-
-
- - Description:
- Returns the intents of the user.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- user.intents - intents identified in user's transcipts.
-
-
-
-
-
- -
- Type
-
- -
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getSpecificIntentsInteractor(user, name) → {Object}
-
-
-
-
-
-
-
-
- - Description:
- Returns the intents of the single transcript requested by the user.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website.
-
-
-
-
-
-
- name
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Name of the transcript file requested by the user.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- singleTranscript.intents - The intents identified in the transcript requested (if it exists).
-
-
-
-
-
- -
- Type
-
- -
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getTranscriptsInteractor(user) → {mongoose.Schema}
-
-
-
-
-
-
-
-
- - Description:
- Returns all the transcripts uploaded by the user.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- user.transcripts - The transcripts uploaded by the user, which is an entity itself.
-
-
-
-
-
- -
- Type
-
- -
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- intentIdentifyInteractor(existingProcessedMap, transcript_json_list) → {Map}
-
-
-
-
-
-
-
-
- - Description:
- Returns a map of the intents of each transcript, and an aggregate
-intent list, by reading the intents of the newly uploaded transctipts.
-If an intent doesn't exist in the map yet, adds it; if it already exists,
-updates the frequency. Moreover, keeps track of which intents come after
-which intent in what frequency, to identify "intent associates".
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- existingProcessedMap
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
- Map of already processed transcripts with their intents.
-
-
-
-
-
-
- transcript_json_list
-
-
-
-
-
-Array
-
-
-
-
-
-
-
-
-
-
- List of transcripts to be uploaded
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- processedMap - Map of all processed transcripts of user and their intents.
-
-
-
-
-
- -
- Type
-
- -
-
-Map
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- transcriptProcessInteractor(existingProcessedMap, transcript_json_list) → {Map}
-
-
-
-
-
-
-
-
- - Description:
- Returns a map of all processed transcripts and their identified intents.
-Currently, our processing algorithm iterates through the newly uploaded transcripts and identifies new
-intents using intentIdentifyInteractor
Use Case.
-If we would like to add more processing steps for a transcript in the future, we can easily do so in this file.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- existingProcessedMap
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
- Map of already processed transcripts with their intents.
-
-
-
-
-
-
- transcript_json_list
-
-
-
-
-
-Array
-
-
-
-
-
-
-
-
-
-
- List of transcripts to be uploaded
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
- allCurrentIntents - Map of all processed transcripts (uploaded by user) and their intents.
-
-
-
-
-
- -
- Type
-
- -
-
-Map
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (async) transcriptUploadInteractor(user, file, filename)
-
-
-
-
-
-
-
-
- - Description:
- Processes the transcript that the user has uploaded using the convertMultiWOZInteractor
and
-transcriptProcessInteractor
Use Cases (the latter of which identifies intents using the
-intentIdentifierInteractor
Use Case), and saves the transcript
-and the intents to the database.
-Open-Closed Principle: does not modify our existing code-base significantly;
-only extends the functionality by adding step to convert a MultiWOZ transcript before applying the
-original processTranscript function from transcriptProcessor.
-Liskov Substitution Principle: a transcript containing a single conversation is a subtype
-of a transcript containing multiple conversations, so we may upload a transcript containing
-one conversation as a substitute of a typical transcript containing an unknown number of conversations.
-(Technically, LSP has more to do with interfaces and implementation, but it is still relevant here.)
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- user
-
-
-
-
-
-mongoose.Schema
-
-
-
-
-
-
-
-
-
-
- The current authorized user of the website
-
-
-
-
-
-
- file
-
-
-
-
-
-JSON
-
-
-
-
-
-
-
-
-
-
- The JSON transcript file that the user has uploaded
-
-
-
-
-
-
- filename
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Name of the file the user has uploaded
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (async) userLoginInteractor(email, password)
-
-
-
-
-
-
-
-
- - Description:
- Checks if email and password combination exists in the database,
-and if it does, logs the user in.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- email
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The email given by the user
-
-
-
-
-
-
- password
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The password chosen by the user
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (async) userRegisterInteractor(email, password)
-
-
-
-
-
-
-
-
- - Description:
- Creates the user and registers it to the database.
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- email
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The email given by the user
-
-
-
-
-
-
- password
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- The password chosen by the user
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-