Name

adams.flow.transformer.TwitterFilter


Synopsis

Filters Twitter objects (tweet/status) according to the provided filter expression. Only objects that match the filter expression are passed on.

The expressions use the following grammar:

expr_list ::= expr_list expr | expr;
expr ::= ( expr )
              | boolexpr
              ;

boolexpr ::= BOOLEAN
              | ( boolexpr )
              | not boolexpr
              | boolexpr and boolexpr
              | boolexpr or boolexpr
              | boolexpr xor boolexpr
              | numexpr < numexpr
              | numexpr <= numexpr
              | numexpr = numexpr
              | numexpr > numexpr
              | numexpr >= numexpr
              | numexpr <> numexpr

              | retweet
              | isretweeted

              | langcode <match> pattern
              | country <match> pattern
              | countrycode <match> pattern
              | place <match> pattern
              | source <match> pattern
              | text <match> pattern
              | user <match> pattern
              | screenname <match> pattern
              | hashtag <match> pattern
              | usermention <match> pattern
              | statuslang <match> pattern

              | if[else] ( boolexpr:test , boolexpr:test_true , boolexpr:test_false )
              | has ( parameter )
              ;

numexpr ::= num
              | longitude
              | latitude
              | favcount
              ;

parameter ::= langcode
              | country
              | countrycode
              | place
              | source
              | text
              | user
              | longitude
              | latitude
              ;

The '<match>' operator can be one of the following:
1. '=' - exact match (the twitter field must be the exact 'pattern' string)
2. ':' - substring match (the 'pattern' can occur anywhere in the twitter field)
3. '~' - regular expression match (the 'pattern' is a regular expression that the twitter field must match)

Please note, all strings are converted to lower case before the filter is applied.


Additional information

Flow input/output:
- input: twitter4j.Status
- output: twitter4j.Status


Options