Map 1
napkin
  language detect
    spacy.io
    nlp
      token
        span
        verb
        noun
        punct
        oov
          hashtag
          mention
          digit
          (space)
          url
          email
        labels
  output
    readable
    json
    csv
  Storage (redis)
A pre-language detection is performed to detect the language before Spacy is loaded. This allows to discreminate submitted content in one language and the analysis is set to another language. The library used is CLD3 (more space/speed efficient than using the langdetect of the spacy pipeline).
If the language detection match (using CLD3) the requested, spacy.io NLP is loaded and the document is analysed. There are some option to avoid the load of the complete parser depending of the arguments.
The output is based on the ranked set available in the storage.
A redis storage is used to keep the output of analysis token into a data structure per analysis. Each analysis has its own ranked set where the key name is the analysis name. There is a global stats ranked set to keep statistics of all the analysis performed.