Skip to content

Commit

Permalink
docs: update relay usage with sentiment filter example
Browse files Browse the repository at this point in the history
  • Loading branch information
atrifat committed Jul 12, 2024
1 parent cb7102e commit 2b899b4
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

nostr-filter-relay can be used and activated as relay for "Global" feed in our Nostr clients. Simply add `wss://nfrelay.app` (public demo relay, or change it into our own nostr-relay-filter url) to our nostr clients and set it to enable reading in "Global" relay settings.

If we don't add any parameter (?) behind the url of `wss://nfrelay.app` then it is equal to using relay with parameters using its default values:
If we don't add any parameter (?) behind the url of `wss://nfrelay.app` then it is equal to using relay with parameters using its default parameter values:

`wss://nfrelay.app/?user=all&lang=all&content=sfw&nsfw_confidence=75&lang_confidence=15&toxic=no&toxic_confidence=75`
`wss://nfrelay.app/?user=all&lang=all&content=sfw&nsfw_confidence=75&lang_confidence=15&toxic=no&toxic_confidence=75&sentiment=all&sentiment_confidence=35`

Default values above will make relay filter events focus on **"General common users"** by serving **'family-friendly'** note events by default. However, we can customize the parameter (using single or multiple parameters) based on our needs. Check **Examples** to get the gists on how to use nostr-filter-relay.

Expand Down Expand Up @@ -130,6 +130,32 @@ The following are various examples on how to use nostr-filter-relay which illust
>
> Add `wss://nfrelay.app/?toxic=no&toxic_confidence=90` (default toxic_confidence: 75, valid value: 0-100)
### Sentiment Filtering Example

> **Note**
>
> "I wanna see positive and neutral posts only."
>
> **Answer**
>
> Add `wss://nfrelay.app/?sentiment=positive,neutral`
> **Note**
>
> "My life is full of happiness. I wanna see some negativity to balance it :P"
>
> **Answer**
>
> Add `wss://nfrelay.app/?sentiment=negative`
> **Note**
>
> "I want to see neutral posts with minimum confidence/probability score 70%"
>
> **Answer**
>
> Add `wss://nfrelay.app/?sentiment=neutral&sentiment_confidence=70` (default value: 35, valid value: 0-100)
### Confidence Score Filtering Example

> **Note**
Expand Down

0 comments on commit 2b899b4

Please sign in to comment.