Disabled tokens in rel.manual not working

I have added disabled: "true" to tokens, but they are still selectable in rel.manual (both relations and spans).

  "text": "I like baby cats because they're cute",
  "tokens": [
    {"text": "I", "start": 0, "end": 1, "id": 0, "ws": true, "disabled": true},
    {"text": "like", "start": 2, "end": 6, "id": 1, "ws": true},
    {"text": "baby", "start": 7, "end": 11, "id": 2, "ws": true},
    {"text": "cats", "start": 12, "end": 16, "id": 3, "ws": true},
    {"text": "because", "start": 17, "end": 24, "id": 4, "ws": true},
    {"text": "they", "start": 25, "end": 29, "id": 5, "ws": false},
    {"text": "'re", "start": 29, "end": 32, "id": 6, "ws": true},
    {"text": "cute", "start": 33, "end": 37, "id": 7, "ws": false}
  "spans": [
    {"start": 7, "end": 16, "token_start": 2, "token_end": 3, "label": "REF"},
    {"start": 25, "end": 37, "token_start": 5, "token_end": 7, "label": "REASON"},
    {"start": 33, "end": 37, "token_start": 7, "token_end": 7, "label": "ATTR"}

Example from here: https://prodi.gy/docs/api-interfaces#relations also not wokring or am I missing some arguments?

Hi! The example here refers to what the interface can render, but the rel.manual recipe currently only uses the provided tokens for segmentation and ignores the pre-defined disabled values so they don't conflict with any of the other options like merged phrases and disable patterns.

We could consider changing this but I'd need to test that this doesn't have any unintended problems or side-effects. In the meantime, you could try adding it yourself by modifying the preprocess_stream function in recipes/rel.py and changing the following:

# Find this line
doc = Doc(nlp.vocab, words=words, spaces=spaces)
# Add this:
for i, token in enumerate(eg["tokens"]):
    if token.get("disabled"):
        doc[i]._.disabled = True
1 Like