Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

Repository files navigation

Analysis API

REST-powered API for analyzing media and text.

Endpoints

  • Media analysis <bind-address>/analysis/{reqType}/{type}/{id}
  • Text analysis <bind-address>/analysis/{reqType}
  • Health check <bind-address>/healthy

Request types

  • Complete media analysis: complete
  • Media fingerprinting: fingerprinting
  • Media NSFW recognition: nsfw
  • Gibberish text analysis: gibberish

Returned data

The data returned by the server when analyzing media is in the form:

typeAnalysisstruct {
FingerprintFingerprintResponseNSFWNSFWResponseFingerprintErrorStringstringNSFWErrorStringstring
}

The data returned by the server when analyzing text is in the form:

typeGibberishResponsestruct {
IsGibberishbool
}

Environment options

  • API bind address and port: API_BIND_ADDRESS (defaults to localhost:9999).
  • Path to configuration file: API_CFG_PATH (defaults to config.toml).

Configuration file structure

fingerprintendpoint = "http://localhost:10000/fingerprinting"nsfwendpoint = "http://localhost:10001/nsfw"gibberishendpoint = "http://localhost:10002/gibberish"testing = <testing-status>
[database]
authsource = "authsource"collectionname = "collectionname"databasename = "databasename"hosts = ["localhost:27017"]
password = "password"replicasetname = "replicasetname"username = "username"
[redis]
Address = "localhost:6379"NSFWDatabase = 2FingerprintDatabase = 1

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages