Skip to content

Commit

Permalink
Change 'statements' to 'comments' in intro
Browse files Browse the repository at this point in the history
GitOrigin-RevId: a442041895628d04b2d59fdc5fba963d8f0722a9
  • Loading branch information
alyssachvasta authored and copybara-github committed Dec 17, 2024
1 parent 11fca1f commit b09970a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/tasks/stats_checker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ const TEST_SUMMARY_STATS = new SummaryStats([

describe("StatsCheckerTest", () => {
it("should return true for a good summary", () => {
const summary = "There are 60 votes and 5 statements.";
const summary = "There are 60 votes and 5 comments.";
expect(
summaryContainsStats(summary, TEST_SUMMARY_STATS, SummarizationType.VOTE_TALLY)
).toBeTruthy();
});

it("should return false if missing the right statement count", () => {
const summary = "There are 60 votes and 6 statements.";
it("should return false if missing the right comment count", () => {
const summary = "There are 60 votes and 6 comments.";
expect(
summaryContainsStats(summary, TEST_SUMMARY_STATS, SummarizationType.VOTE_TALLY)
).toBeFalsy();
});

it("should return false if missing the right vote count", () => {
const summary = "There are 6 votes and 5 statements.";
const summary = "There are 6 votes and 5 comments.";
expect(
summaryContainsStats(summary, TEST_SUMMARY_STATS, SummarizationType.VOTE_TALLY)
).toBeFalsy();
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/stats_checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function summaryContainsStats(
summaryStats: SummaryStats,
summarizationType: SummarizationType
): boolean {
if (!summary.includes(`${summaryStats.commentCount} statements`)) {
if (!summary.includes(`${summaryStats.commentCount} comments`)) {
console.error(`Summary does not contain the correct number of total comments from the
deliberation. commentCount=${summaryStats.commentCount} and summary=${summary}`);
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/tasks/summarization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("SummaryTest", () => {
it("prompt should include the comment count and the vote count", () => {
// Has 2 comments and 55 votes.
expect(getSummarizationInstructions(true, new SummaryStats(TEST_COMMENTS))).toContain(
"2 statements"
"2 comments"
);
expect(getSummarizationInstructions(true, new SummaryStats(TEST_COMMENTS))).toContain(
"55 votes"
Expand All @@ -72,7 +72,7 @@ describe("SummaryTest", () => {
it("prompt shouldn't include votes if groups aren't included", () => {
// Has 2 comments and 55 votes.
expect(getSummarizationInstructions(false, new SummaryStats(TEST_COMMENTS))).toContain(
"2 statements"
"2 comments"
);
expect(getSummarizationInstructions(false, new SummaryStats(TEST_COMMENTS))).not.toContain(
"55 votes"
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/summarization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ${includeGroups ? "## Description of Groups" : ""}
## Conclusion
The introduction should be one paragraph long and contain ${includeGroups ? "five" : "four"} sentences.
The first sentence should include the information that there were ${summaryStats.commentCount} statements ${includeGroups ? `that had ${summaryStats.voteCount} votes` : ""}.
The first sentence should include the information that there were ${summaryStats.commentCount} comments ${includeGroups ? `that had ${summaryStats.voteCount} votes` : ""}.
The second sentence should include what topics were discussed.
${
includeGroups
Expand Down

0 comments on commit b09970a

Please sign in to comment.