As discussed in T261411, we want the link recommendation output to be a list of items (JSON serialized), each item has the following properties:
- phrase_to_link (text)
- context_before (text -- 5 characters of text that occur before the phrase to link)
- context_after (text -- 5 characters of text that occur after the phrase to link)
- link_target (text)
- instance_occurrence (integer) -- number showing how many times the phrase to link appears in the wikitext before we arrive at the one to link
- probability (boolean)
- insertion_order (integer) -- order in which to insert the link on the page (e.g. recommendation "foo" [0] comes before recommendation "bar baz" [1], which comes before recommendation "bar" [2], etc)