Skip to content

Commit

Permalink
Documentation done, unnecessary files removed.
Browse files Browse the repository at this point in the history
/documentation/global.html must display the documentation of each use case appropriately now. If you see any HTML laying around in random places, let me know. Double click /documentation/global.html to see documentation.
  • Loading branch information
BerkeAltiparmak committed Dec 8, 2022
1 parent f21ebee commit 1df3e18
Show file tree
Hide file tree
Showing 134 changed files with 321 additions and 44,127 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file removed documentation/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions documentation/GetUseCases_getAllIntentsInteractor.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<nav >


<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#convertMultiWOZInteractor">convertMultiWOZInteractor</a></li><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>

</nav>

Expand Down Expand Up @@ -69,7 +69,7 @@ <h1 class="page-title">GetUseCases/getAllIntentsInteractor.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Nov 30 2022 01:47:19 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Dec 07 2022 19:02:14 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
16 changes: 8 additions & 8 deletions documentation/GetUseCases_getSpecificIntentsInteractor.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<nav >


<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#convertMultiWOZInteractor">convertMultiWOZInteractor</a></li><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>

</nav>

Expand All @@ -50,13 +50,13 @@ <h1 class="page-title">GetUseCases/getSpecificIntentsInteractor.js</h1>
* @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.
* @returns {Object} singleTranscript.intents - The intents identified in the transcript requested (if it exists).
*/
const getSpecificIntentsInteractor = (user, name) =>{
const transcript = user.transcripts
for(const obj of transcript){
if(name in obj){
return obj.intents
const getSpecificIntentsInteractor = (user, name) => {
const allUserTranscripts = user.transcripts
for (const singleTranscript of allUserTranscripts) {
if (singleTranscript.filename === name) {
return singleTranscript.intents
}
}
return "No intents"
Expand All @@ -76,7 +76,7 @@ <h1 class="page-title">GetUseCases/getSpecificIntentsInteractor.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Nov 30 2022 01:47:19 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Dec 07 2022 19:02:14 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
6 changes: 3 additions & 3 deletions documentation/GetUseCases_getTranscriptsInteractor.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<nav >


<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#convertMultiWOZInteractor">convertMultiWOZInteractor</a></li><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>

</nav>

Expand All @@ -49,7 +49,7 @@ <h1 class="page-title">GetUseCases/getTranscriptsInteractor.js</h1>
* 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
* @returns {mongoose.Schema} user.transcripts - The transcripts uploaded by the user, which is an entity itself.
*/
const getTranscriptsInteractor = (user) => {
if (user.transcripts !== undefined) {
Expand All @@ -72,7 +72,7 @@ <h1 class="page-title">GetUseCases/getTranscriptsInteractor.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Nov 30 2022 01:47:19 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Dec 07 2022 19:02:14 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
33 changes: 22 additions & 11 deletions documentation/TranscriptUseCases_intentIdentifyInteractor.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<nav >


<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#convertMultiWOZInteractor">convertMultiWOZInteractor</a></li><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>

</nav>

Expand All @@ -48,15 +48,14 @@ <h1 class="page-title">TranscriptUseCases/intentIdentifyInteractor.js</h1>
<pre class="prettyprint source linenums"><code>/**
* 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".
* @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)

Expand All @@ -73,23 +72,29 @@ <h1 class="page-title">TranscriptUseCases/intentIdentifyInteractor.js</h1>
// iterate over each message in a single transcript
for (let i = 0; i &lt; 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);
// update intent frequency in the processed map
updateIntentInProcessedMap(intent);

// update intent associates of the previous intent
if (prevIntent !== undefined &amp;&amp; prevIntent !== intent) {
updatePrevIntentInProcessedMap(intent);
updateAssociateInProcessedMap(prevIntent, intent);
}
prevIntent = intent;
}
}

function updateCurrIntentInProcessedMap(intent) {
if (!processedMap.has(intent)) { // add intent to processedMap
// 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()]);
}
else { // update existing intent frequency and its associates in the map

// if the intent exists, update its frequency
else {
const currList = processedMap.get(intent);
const newIntentFreq = currList[0] + 1;
const sameAssociateMap = currList[1];
Expand All @@ -98,7 +103,9 @@ <h1 class="page-title">TranscriptUseCases/intentIdentifyInteractor.js</h1>
}
}

function updatePrevIntentInProcessedMap(intent) {
// 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) {
Expand All @@ -107,9 +114,13 @@ <h1 class="page-title">TranscriptUseCases/intentIdentifyInteractor.js</h1>
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);
Expand All @@ -132,7 +143,7 @@ <h1 class="page-title">TranscriptUseCases/intentIdentifyInteractor.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Nov 30 2022 01:47:19 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Dec 07 2022 19:02:14 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<nav >


<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#convertMultiWOZInteractor">convertMultiWOZInteractor</a></li><li><a href="global.html#getAllIntentsInteractor">getAllIntentsInteractor</a></li><li><a href="global.html#getSpecificIntentsInteractor">getSpecificIntentsInteractor</a></li><li><a href="global.html#getTranscriptsInteractor">getTranscriptsInteractor</a></li><li><a href="global.html#intentIdentifyInteractor">intentIdentifyInteractor</a></li><li><a href="global.html#transcriptProcessInteractor">transcriptProcessInteractor</a></li><li><a href="global.html#transcriptUploadInteractor">transcriptUploadInteractor</a></li><li><a href="global.html#userLoginInteractor">userLoginInteractor</a></li><li><a href="global.html#userRegisterInteractor">userRegisterInteractor</a></li></ul>

</nav>

Expand All @@ -45,19 +45,20 @@ <h1 class="page-title">TranscriptUseCases/transcriptProcessInteractor.js</h1>

<section>
<article>
<pre class="prettyprint source linenums"><code>const intentIdentify = require('./intentIdentifyInteractor')
<pre class="prettyprint source linenums"><code>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
}

Expand All @@ -75,7 +76,7 @@ <h1 class="page-title">TranscriptUseCases/transcriptProcessInteractor.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Nov 30 2022 01:47:19 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> on Wed Dec 07 2022 19:02:14 GMT-0500 (Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading

0 comments on commit 1df3e18

Please sign in to comment.