Skip to content

Commit

Permalink
Update fetchLinkSuggestions to sort results by relevancy (#62397)
Browse files Browse the repository at this point in the history
* Update fetchLinkSuggestions to sort results by relevancy

- Rename __experimentalFetchLinkSuggestions to fetchLinkSuggestions.
- Rewrite fetchLinkSuggestions in TypeScript.
- Sort results by relevancy using cosine similiarty between term frequency vectors.

* Fix tsc errors

* Update @wordpress/core-data imports

* Make tokenize unicode aware

* Remove unnecessary mutation

* Add tests for all the helper functions

* Simpler scoring function

* Keep experimental for now

Unlinked contributors: scrobbleme.

Co-authored-by: noisysocks <[email protected]>
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: ramonjd <[email protected]>
Co-authored-by: andrewserong <[email protected]>
Co-authored-by: skorasaurus <[email protected]>
  • Loading branch information
7 people authored Jun 14, 2024
1 parent 5ac2ede commit 18676a8
Show file tree
Hide file tree
Showing 3 changed files with 391 additions and 238 deletions.
237 changes: 0 additions & 237 deletions packages/core-data/src/fetch/__experimental-fetch-link-suggestions.js

This file was deleted.

Loading

1 comment on commit 18676a8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 18676a8.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9511716614
📝 Reported issues:

Please sign in to comment.