Wiki.Ores (wiki_elixir v0.2.5) View Source
This module provides an adapter for the ORES scoring service.
Examples
"enwiki"
|> Wiki.Ores.new()
|> Wiki.Ores.request(
models: ["damaging", "wp10"],
revids: 456789
)
|> Jason.encode!(pretty: true)
|> IO.puts()
Link to this section Summary
Link to this section Functions
Specs
new(String.t()) :: Tesla.Client.t()
Create a new ORES client.
Arguments
project
- Short code for the wiki where your articles appear. For example, "enwiki" for English Wikipedia.
Return value
Returns an opaque client object, which should be passed to request/2
.
Specs
request(Tesla.Client.t(), keyword() | map()) :: map()
Make an ORES request.
Don't request scores for more than 50 revisions per request.
Arguments
client
- Client object as returned bynew/1
.params
- Keyword list of query parameters,:models
- Learning models to query. These vary per wiki, see the support matrix for availability and to read about what each model is scoring. Multiple models can be passed as a list, for example,[:damaging, :wp10]
, or as a single atom,:damaging
.:revids
- Revision IDs to score, as a single integer or as a list.