[READ-ONLY] Mirror of https://github.com/andrioid/techscrolls.
0

Configure Feed

Select the types of activity you want to include in your feed.

letting bayes handle it

+3 -7
+3 -7
packages/atproto/scripts/classifier.ts
··· 1 1 import { subHours } from "date-fns"; 2 2 import { and, eq, gte, inArray, isNull } from "drizzle-orm"; 3 - import { mutedWordsClassifier } from "../classifiers/tech/muted-words"; 4 - import { techLinkClassifier } from "../classifiers/tech/tech-links"; 5 - import { techWordsRegExp } from "../classifiers/tech/tech-words"; 6 3 import { createBayesClassiferFn } from "../classifiers/tfjs"; 7 4 import type { ClassifierFn } from "../classifiers/types"; 8 5 import { createAtContext } from "../context"; ··· 12 9 import { postTable } from "../domain/post/post.table"; 13 10 14 11 export const LISTEN_NOTIFY_POSTQUEUE = "atproto.postqueue"; 15 - const POSTS_PER_CLASSIFIER_RUN = 500; 16 12 17 13 // TODO: Need to move this and all of its deps to a new package. TFJS SUUUUCKS 18 14 export async function classifier(postUri?: Array<string>) { ··· 20 16 const ctx = await createAtContext(); 21 17 22 18 const classifiers: Array<ClassifierFn> = [ 23 - mutedWordsClassifier, 24 - techWordsRegExp, 25 - techLinkClassifier, 19 + // mutedWordsClassifier, 20 + // techWordsRegExp, 21 + // techLinkClassifier, 26 22 ]; 27 23 28 24 // If not enough training data, the bayes classifier is skipped