Method: WLAPI::API#left_neighbours

Defined in:
lib/wlapi/api.rb

#left_neighbours(word, limit = 10) ⇒ Object

TODO:

ok, but results should be filtered

For a given input word, returns statistically significant left neighbours (words co-occurring immediately to the left of the input word).

api.left_neighbours("Auto") => ["geparktes", "Auto", "561", ...]



198
199
200
201
202
203
204
205
206
# File 'lib/wlapi/api.rb', line 198

def left_neighbours(word, limit = 10)
  check_params(word, limit)

  arg1 = ['Wort', word]
  arg2 = ['Limit', limit]
  answer = query(@cl_LeftNeighbours, arg1, arg2)

  get_answer(answer)
end