Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose clusters in R #9

Open
woodthom2 opened this issue Jan 25, 2025 · 0 comments
Open

Expose clusters in R #9

woodthom2 opened this issue Jan 25, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@woodthom2
Copy link
Contributor

Description

See also front end issue harmonydata/app#42

The API is now grouping items into topics.
Please can we expose this functionality from the R library.

You can see this in the call to /text/match, e.g.:

curl -X 'POST' \
  'http://localhost:8000/text/match?include_catalogue_matches=false&is_negate=true' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "instruments": [
    {
      
      "questions": [
        {
          "question_text": "Feeling nervous, anxious, or on edge"
        },
        {
          "question_text": "Not being able to stop or control worrying"
        }
      ]
    },
    {
      "questions": [
        {
          "question_text": "Sentir-se nervoso/a, ansioso/a ou muito tenso/a"
        },
        {
          "question_text": " Não ser capaz de impedir ou de controlar as preocupações"
        }
      ]
    }
  ]
}'
{
  "instruments": [
  
///... ///
    }
  ],
  "clusters": [
    {
      "cluster_id": 0,
      "centroid_id": 0,
      "item_ids": [
        0,
        2
      ],
      "text_description": "Feeling nervous, anxious, or on edge"
    },
    {
      "cluster_id": 1,
      "centroid_id": 1,
      "item_ids": [
        1,
        3
      ],
      "text_description": "Not being able to stop or control worrying"
    }
  ]
}

Rationale

Many users have requested this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant