Filtering your Network Stream

An alternative to use the filters explained on this page is to use channels for selecting the content one wants to be shown.

The content filter addon is a simple filter, that matches words specified by the user to the text of postings in the network stream. If the text includes one of the words, the posting will be collapsed and the word that triggered the filter will be displayed to the user why the posting was collapsed. The case of the words does not matter, NSWF and nsFW will both match the commonly used tag for content not save for work.

Below a screenshot of the content filters settings. To filter postings, just list the words the filter should search for, separated by a comma in the settings. The example below will collapse all postings containing the words apple, soccer and nsfw. In addition the green square used by postings about the daoly results a popular quiz in the internet, will trigger the filter.

Screenshot of the user settings of the content filter addon

The advanced content filter uses Symfony’s Expression Language. This help page includes a summary of the Symfony’s Expression Language documentation page. Filter rules of the advanced content filter are much more complex then the simple content filter “rules”, but they also allow more powerful conditions that will trigger the filtering of postings.

Basics

The advanced content filter matches each post that is about to be displayed against each enabled rule you set.

A rule is a boolean expression that should return either true or false depending on post variables.

If the expression using a post variables returns true, the post will be collapsed and the matching rule name will be displaye d above the collapsed content.

A post will be collapsed if at least one rule matches, but all matching rule names will be displayed above the collapsed content.

Examples

  1. Collapse posts with specific domains body matches "/\\.example\\.com/"
  2. Collapse posts that contains the words body matches "/Guten Morgen/"
  3. Collapse posts with the word facebook that have a space in front and after the word body matches "//s facebook/s /"
  4. Collapse posts that contains more than 1 image body matches "/(?:(?:(?:\\[url(?:=.*)?\\])?\\[img(?:=.*)?\\].*\\[\\/img\\]\\s*(?:\\[\\/url\\])?)\\s*){2}/"
  5. Collapse posts that were shared causer_link != author_link if you only want to filter posts from a specific sharer you can expand this rule with a check for their profile URL causer_link != author_link && causer_link == '<profile_url>'

For a more detailed documentation of the addons functionality, please have a look at the addons repository.

If the language filter addon was activated in the nodes admin settings, users can filter their network stream based on the language of the postings. The settings for the addon can be found in user settings → addons → language filter. Here the user can control the following things

  • Which languages are spoken by the user. If the system detects a posting written in a different language and the other filtering rules apply as well, the posting will be collapsed.
  • Minimum confidence level into the detected language. The method to determine a postings language also calculates some value how certain it is about the detected language. For example something like “Good Morning Fediverse” has confidence levels around 50% for Dutch, Swedish and German. This setting allows the users to select the confidence value at which the filtering should be applied. The lower the value, the more false positives you will encounter.
  • Minimum length of the text. Language detection works best on longer texts, on short texts the false positive rate will be higher.

To gain good filtering results, you will need to play a bit with the values for the confidence level and the length of the postings.

Below in the screenshot you see filter settings for a user speaking English and German. So postings in other languages will potentially filtered out of the network stream. The minimum confidence level is set to 30% and the minimum text length to apply the filter is set to 200 characters. These settings work reasonable well, though they will show your average tweet in French or Italian.

Screenshot of the "Language Filter" settings. Shown are settings for filtering all postings with a length over 200 characters, with a confidence in the language of 30% or higher, that are not written in English or German.

Postings will only be collapsed in your network stream. This allows you to have a look into the filtered postings, e.g. if you know that Susan wont write texts in German but the filter does announce it, you might very well encountered a false positive. In this case, you should adjust the settings of the filter accordingly.

For information about how to use Abstracts1) please see the article about them: Abstracts.


1)
or Content Warnings in other parts of the Fediverse
  • Last modified: 2024-01-21 14:17