Briefly each type is:
Alcohol - Any alcohol related words that some applications might want to filter such as
beer, ale, wine, etc.
Drug - Any drug related words/slang that some applications might want to filter such as
pot, weed, bong, etc.
Religion - Currently this category is rather small, but includes words that might offend
certain users who have strong religious beliefs. This includes words and phrases
such as "god damnit", "anti-christ", etc.
Slang - Slang is a very broad category and includes most words that are not considered
direct swears. The slang category includes words such as airhead, bang, bimbo, etc.
Swear - Swear is a very broad category and includes all words that are only considered
direct swears. These words usually have no other meaning than profanity. The Swear
category includes words such as shit, ass, fuck, etc.
Youth - This category contains all the words that are dictionary words and have no slang
meanings but might be deemed inappropriate for younger users. This includes words
such as beastiality, bisexual, homosexual, etc.
The rating is an integer from 1-10 that is used to tell the filter to be more or less
strict. Words that are considered more profane have a higher rating using a higher valued
integer. Words that are less offensive and profane have a lower rating. The rating is
mainly used to tune the performance of the filter while still capturing all the words
that the application wishes to filter. The higher the rating the fewer words that need
to be filtered and the fast the filter will perform.
This element is the response from the Inversoft Profanity WebService. It denotes either a
successful or failure response from the WebService. There are two sub-elements that dictate
whether or not the request was successful or not.
Success and Failure Elements
----------------------------
The valid element denotes that the WebService request was successful and that a result is
available. This element is used for both the FIND and REPLACE operations that the WebService
can perform. The results are stored in either a replace or find sub-element. The type of
response within the valid response is controlled by the operation attribute of the
profanityRequest element. If the operation is FIND then a find element will always be
returned. If the operation is REPLACE then a replace element will always be returned.
The invalid element denotes that the WebService was unable to fulfill the request. This
element contains only a single sub-element called error. This element has a code attribute
which can be used to determine the specific type of error and the text body of this element
is a detailed error message.
Find Element
---------------
The find element is returned when the WebService successfully completed a find operation.
This element is a list of results from the find operation and each result denotes an
instance of profanity found by the WebService. The result elements contain a number of
attributes that provide additional information about the result. Those attributes are:
offset - The offset from the beginning of the text block sent in the profanityRequest to
the WebService of the profanity found. This offset includes all whitespace that might
be present in the text block of the profanityRequest. The offset will always start
at a location in the text block of a number or letter or punctuation and will never
be a whitespace character. The reason it could be a punctuation character is that
if someone is attempting to circumvent the filter, they might begin a word with a
period or dash. For example:
This website .f.u.c.k.i.n.g sucks.
is deemed to begin with a period.
length - The length is the total length of the profanity found within the text block sent in
the profanityRequest. The length will always end with a letter or number character
even with more tricky situations where the profanity contains punctuation. For
example:
This website is .s.h.i.t.
The length of this profanity is 8 rather than 9 because the final character is a
punctuation and could demarcate the end of a sentence of some other meaning within
the text block.
word - The word attribute is the profanity word that was found. This is the natural form
of the word and not the form found in the text block. Using the example:
This website .f.u.c.k.i.n.g sucks.
the word attribute would be 'fuck'.
type - The type attribute denotes what type of word the profanity is. This attribute is
the profanityType simple type. See the documentation for that type for more
information.
rating - This is the rating of the profanity word that was found. This rating can help
determine the severity of words and these can be cached by the application and
used for reporting to help tune the requests sent to the Profanity WebService.
Replace Element
---------------
The replace element is returned within the valid element when a successful REPLACE operation
has been completed. This element contains only a single element named text. This element
contains the same content from the text block of the profanityRequest except that all
profanity that was found by the WebService will have been replaced by using the
replacementCharacter attribute from the profanityRequest.
AccountInfo Element
-------------------
Any time a successful response is returned the valid element contains an element named
accountInfo. This element contains information about the current requesters account. This
includes the number of requests remaining in the month, the subscription type and the
maximum requests allowed each month.
Error Codes
-----------
Any time a failure response is returned it will include an error element. This element will
contain an error code that can be used to determine the type of error. Here are all the
possible error codes:
1 - Invalid credentials. This denotes that the credentials provided do not match any account
in the system
2 - Account Suspended. This denotes that the account making the requests has been
suspended. More information can be obtained from Inversoft by emailing support at
support@inversoft.com.
3 - Byte limit exceeded. This denotes that the maximum number of bytes for the account
has been execeeded and the account is currently inactive. The subscription plan can be
upgraded to fix this issue. Contact Inversoft support at support@inversoft.com to find out more.
4 - Unexpected failure. This denotes that the Inversoft Profanity WebService encountered an
error that was unexpected. This error is usually a system failure at the WebService side
and Inversoft support is usually notified of these types failures automatically. However,
it is a good idea to capture these errors and contact Inversoft support immediately to
reduce the impact on your customers.
5 - Invalid or Malformed XML. This denotes that the xml data does not conform to the xml schema.
6 - Account Pending. This denotes that your subscription is setup but the account is pending activation.
This usually occurs if there is a problem with billing. If this error persist please contact Inversoft
at support@inversoft.com immediately.
7 - Account Expired. This denotes that the account has expired for the current subscription.
8 - No subscription service on record. This denotes that the credentials supplied are valid, however,
no subscription exists for the credentials specified.