diff --git a/lib/pangea/controllers/message_analytics_controller.dart b/lib/pangea/controllers/message_analytics_controller.dart index 99f01eeb3..87367fbfe 100644 --- a/lib/pangea/controllers/message_analytics_controller.dart +++ b/lib/pangea/controllers/message_analytics_controller.dart @@ -115,8 +115,13 @@ class MessageAnalyticsEntry { // sort the queue by the total xp of the tokens, lowest first queue.sort( - (a, b) => a.tokens.map((t) => t.xp).reduce((a, b) => a + b).compareTo( - b.tokens.map((t) => t.xp).reduce((a, b) => a + b), + (a, b) => a.tokens + .map((t) => t.vocabConstruct.points) + .reduce((a, b) => a + b) + .compareTo( + b.tokens + .map((t) => t.vocabConstruct.points) + .reduce((a, b) => a + b), ), ); @@ -129,13 +134,13 @@ class MessageAnalyticsEntry { // limit to 3 activities final limited = queue.take(3).toList(); - debugPrint("activities for ${PangeaToken.reconstructText(_tokens)}"); - for (final activity in limited) { - debugPrint("activity: ${activity.activityType}"); - for (final token in activity.tokens) { - debugPrint("token: ${token.analyticsDebugPrint}"); - } - } + // debugPrint("activities for ${PangeaToken.reconstructText(_tokens)}"); + // for (final activity in limited) { + // debugPrint("activity: ${activity.activityType}"); + // for (final token in activity.tokens) { + // debugPrint("token: ${token.analyticsDebugPrint}"); + // } + // } return limited; } diff --git a/lib/pangea/models/analytics/constructs_model.dart b/lib/pangea/models/analytics/constructs_model.dart index 1a9118838..b3d7ca235 100644 --- a/lib/pangea/models/analytics/constructs_model.dart +++ b/lib/pangea/models/analytics/constructs_model.dart @@ -159,9 +159,9 @@ class OneConstructUse { static String _guessGrammarCategory(String morphLemma) { for (final String category in morphCategoriesAndLabels.keys) { if (morphCategoriesAndLabels[category]!.contains(morphLemma)) { - debugPrint( - "found missing construct category for $morphLemma: $category", - ); + // debugPrint( + // "found missing construct category for $morphLemma: $category", + // ); return category; } } diff --git a/lib/pangea/models/pangea_token_model.dart b/lib/pangea/models/pangea_token_model.dart index ade520102..694c272ff 100644 --- a/lib/pangea/models/pangea_token_model.dart +++ b/lib/pangea/models/pangea_token_model.dart @@ -253,9 +253,9 @@ class PangeaToken { switch (a) { case ActivityTypeEnum.wordMeaning: if (isContentWord) { - return vocabConstruct.points < 10 || daysSinceLastUseByType(a) > 7; + return vocabConstruct.points < 30; } else if (canBeDefined) { - return !_didActivity(a) && vocabConstruct.points < 5; + return vocabConstruct.points < 5; } else { return false; } diff --git a/lib/pangea/widgets/practice_activity/practice_activity_card.dart b/lib/pangea/widgets/practice_activity/practice_activity_card.dart index 2fbc7cd10..926e305a9 100644 --- a/lib/pangea/widgets/practice_activity/practice_activity_card.dart +++ b/lib/pangea/widgets/practice_activity/practice_activity_card.dart @@ -139,9 +139,18 @@ class PracticeActivityCardState extends State { } debugPrint( - "client requesting ${nextActivitySpecs.activityType.string} for: ${nextActivitySpecs.tokens.map((t) => "word: ${t.text.content} xp: ${t.xp}").join(' ')}", + "client requesting ${nextActivitySpecs.activityType.string} for: ${nextActivitySpecs.tokens.map((t) => "construct: ${t.lemma.text}:${t.pos} points: ${t.vocabConstruct.points}").join(' ')}", ); + // debugger( + // when: kDebugMode && + // nextActivitySpecs.tokens + // .map((a) => a.vocabConstruct.points) + // .reduce((a, b) => a + b) > + // 30 && + // nextActivitySpecs.activityType == ActivityTypeEnum.wordMeaning, + // ); + final PracticeActivityModelResponse? activityResponse = await pangeaController.practiceGenerationController .getPracticeActivity(