From 6d140543dff840e8b44f6ad44d41e314dd3e6411 Mon Sep 17 00:00:00 2001 From: Olivier Coutu Date: Sun, 29 Sep 2024 20:30:36 -0400 Subject: [PATCH 1/3] Make Gdocs overwrite alternative answers --- parser/coda.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/coda.js b/parser/coda.js index 4e4bc23..3bcc07a 100644 --- a/parser/coda.js +++ b/parser/coda.js @@ -124,7 +124,7 @@ export const updateAnswer = async ( preexistingSuggestionCount: suggestionCount, preexistingSuggestionSize: suggestionSize, commentsCount: commentsCount, - alternativePhrasings: (alternativePhrasings || []).join("\n"), + alternativePhrasings: alternativePhrasings, lastIngested: new Date().toISOString(), banners: banners, UIID: uiid, From 5712df6ab8f977b0a5c896d0d6b6c179837390ed Mon Sep 17 00:00:00 2001 From: Olivier Coutu Date: Sun, 29 Sep 2024 20:54:26 -0400 Subject: [PATCH 2/3] Revert "Make Gdocs overwrite alternative answers" This reverts commit 6d140543dff840e8b44f6ad44d41e314dd3e6411. --- parser/coda.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/coda.js b/parser/coda.js index 3bcc07a..4e4bc23 100644 --- a/parser/coda.js +++ b/parser/coda.js @@ -124,7 +124,7 @@ export const updateAnswer = async ( preexistingSuggestionCount: suggestionCount, preexistingSuggestionSize: suggestionSize, commentsCount: commentsCount, - alternativePhrasings: alternativePhrasings, + alternativePhrasings: (alternativePhrasings || []).join("\n"), lastIngested: new Date().toISOString(), banners: banners, UIID: uiid, From f2680c098dcb3696b53b5941bb808229c3520da5 Mon Sep 17 00:00:00 2001 From: Olivier Coutu Date: Sun, 29 Sep 2024 21:03:57 -0400 Subject: [PATCH 3/3] Just use Gdocs alternate phrasings --- parser/main.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/parser/main.js b/parser/main.js index 5f468cd..7b0a8bb 100644 --- a/parser/main.js +++ b/parser/main.js @@ -204,13 +204,6 @@ const makeAnswerProcessor = }); } ); - const uniqueAlternatives = [ - ...new Set( - alternativePhrasings.concat( - (answer[codaColumnIDs.alternativePhrasings] || "").split("\n") - ) - ), - ].map((i) => i.trim()); const relatedAnswerNames = validRelatedAnswers.map( (relatedAnswerDocID) => @@ -228,7 +221,7 @@ const makeAnswerProcessor = suggestionCount, suggestionSize, commentsCount, - uniqueAlternatives + alternativePhrasings ); return (