Archive of the USPol Labeler's automatic labeling script. Out-of-date. Must run alongside Ozone. DO NOT OPEN ISSUES OR PULLS -- THEY WILL BE IGNORED/CLOSED
at tip 2.1 kB view raw
1# Keywords (comma-separated) Label Score/Weight 2kamala,momala kamala-harris 100 3trump donald-trump 90 4donald donald-trump 30 5vote election 40 6tangerine donald-trump 30 7tfg,the former guy donald-trump 80 845,47 donald-trump 20 9card donald-trump -20 10president miscellaneous-uspol 49 11supreme court miscellaneous-uspol 80 12scotus miscellaneous-uspol 100 13clarence thomas miscellaneous-uspol 100 14gaza,israel,palestine foreign-relations 30 15# +------------<[[ LABELS ]]>------------ 16# | bonus-points-only -- only applies "bonus points", to indicate if a post is likely to be political 17# | or:<LABEL> -- applies "bonus points" if there are other labels to apply bonus points to; otherwise 18# | applies the points to <LABEL> 19# | bo:<LABEL> -- applies "bonus points" to only the label, only if it otherwise has a positive score 20# +------------<[[ KEYWORDS ]]>------------ 21# | -$lang:XX -- exclude a language by its two letter lang code 22# | $lang:XX -- only match these keywords when the message is in this language 23# | $labelval -- match a self-label with value "labelval" (as if it were a keyword) 24# | -text -- only match these keywords when "text" doesn't have a match 25# +------------<[[ OTHER TIPS ]]>------------ 26# | * Form keyword sets by separating with commas. NOT commas and spaces! 27# | GOOD: 28# | keywords,multiple 29# | BAD: 30# | keywords, multiple 31# | * You can match keywords that have spaces or symbols in them, i.e. "help wanted" or "riff-raff". 32# | That way, those words in different orders or on their own don't match. 33# | * If you add a line with an EMPTY label and score, it adds those keywords to the keyword set on the 34# | previous line. 35# | * Since we don't use a fourth column, you can use it to hide comments on the same line, i.e. to 36# | remind yourself of what a keyword set is for. 37# +------------<[[ EDITOR ]]>------------ 38# | In Neovim, I use csvview.nvim to format TSV files to be readable. 39# | To activate it, I have to run: 40# | :CsvViewToggle comment=# 41# +------------------------------------ 42# vim: softtabstop=0:noexpandtab