Metadata Introduction

Metadata API requests return JSONs which contain information extracted from the text. This documentation details both the required POST fields and the returned JSON's format. All POST fields listed must be specified, even if they are specified as empty.

All metadata api requests should be made via POST request to api.playAnalyzer.com/metadata.


Character List

Type: character_list

Description:

Returns all of the characters in the text.

Fields:

None

Returns:

{"characters": [array of characters]}


Most Common Words

Type: most_common_words

Description:

Returns an ordered array of the most commonly used words in the corpous.

Fields:

acts, from_scene, to_scene, characters

Returns:

[{"word": ___, "count": ___}, ...]


Character Speech Flow

Type: character_speech_flow

Description:

Returns an ordered array of the characters that speak after each other most frequently.

Fields:

acts, from_scene, to_scene, characters

Returns:

[{"character_1": ___, "character_2": ___, "count": ___, "percentage": ___}, ...]


Concordance

Type: concordance

Description:

Returns every instance of the requested word or phrase in context

Fields:

acts, from_scene, to_scene, characters, words

Returns:

String with concordance occurances seperated by newline


Common context

Type: common_contexts

Description:

Returns a list of words that occur within the same contexts as the requested word. Submitting more than one word is an and request (words that occur in the context of both) not an or request.

Fields:

acts, from_scene, to_scene, characters, words

Returns:

[{"word": ___, "context": ___}, ...]


Parsed Play List

Type: parsed_play_list

Description:

Returns a json

Fields:

None

Returns:

[{"entry_type": ___, ...(entry specific properties)...}, ...]

PML V0.1 entry_types:properties are

  • Dialogue: characterName, text
  • StageDirection: direction
  • Entrance: characterNames
  • Exit: characterNames
  • Comment: startingWord, endingWord, text
  • Act: actNumber
  • Scene: sceneNumber
  • PlayInfo: title, author
  • VersionNumber: versionNumber
  • Unknown: entryName, entryParameters, entryBody