-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Correct alignment example and documentation #11491
Correct alignment example and documentation #11491
Conversation
Could you also update the outdated references to |
Converted to draft as it turns out this is another aspect to this task I hadn't been aware of. |
website/docs/api/example.md
Outdated
@@ -286,10 +286,12 @@ Calculate alignment tables between two tokenizations. | |||
|
|||
### Alignment attributes {#alignment-attributes"} | |||
|
|||
Alignment attributes are managed using the `AlignmentArray`, which is a simplified version of Thinc's [Ragged](https://thinc.ai/docs/api-types#ragged) type that only supports the `data` and `length` attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a separate container entry for AlignmentArray
seemed like overkill, so I just added this note instead. Although it closely follows the in-code documentation, it's not 100% accurate as AlignmentArray
actually contains two additional properties, but none that a user would be likely to want to access. I feel this solution is a good compromise between accuracy and clarity/conciseness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! The example still contains a few references to dataXd
, though (lines 314-317).
Thanks, I hadn't seen those! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just one minor comment.
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
Description
Closes #11482.
Types of change
Correction to the documentation, including an example that was not running correctly
Checklist