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

String normalisation #146

Closed
neo-technology-build-agent opened this issue Sep 1, 2022 · 5 comments
Closed

String normalisation #146

neo-technology-build-agent opened this issue Sep 1, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@neo-technology-build-agent
Copy link
Collaborator

Issue by legraphista
Sunday Oct 08, 2017 at 20:15 GMT
Originally opened as neo4j-contrib/neo4j-apoc-procedures#628


Any plans to support string normalisation?

NFC — Normalization Form Canonical Composition.
NFD — Normalization Form Canonical Decomposition.
NFKC — Normalization Form Compatibility Composition.
NFKD — Normalization Form Compatibility Decomposition.

Thank you for the great work that has been poured into this project!

@neo-technology-build-agent neo-technology-build-agent added the enhancement New feature or request label Sep 1, 2022
@neo-technology-build-agent
Copy link
Collaborator Author

Comment by legraphista
Sunday Oct 08, 2017 at 20:23 GMT


Hmm 🤔
I found the code here but when calling apoc.text.clean("test") it returns an unregistered procedure error.

When calling dbms.procedures() the only text related apoc procedures that I get are apoc.text.phonetic and apoc.text.phoneticDelta

I'm using the following:
Neo4j: 3.1.7
Apoc: 3.1.3.8-all

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by legraphista
Sunday Oct 08, 2017 at 20:40 GMT


Closed in favour of #629

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by jexp
Monday Oct 09, 2017 at 19:27 GMT


@legraphista is there a Java library that does these?

That one is a user definined function now. You can use RETURN apoc.text.clean("test")

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by legraphista
Tuesday Oct 10, 2017 at 09:14 GMT


Yep @jexp, I had to re-read the documentation to notice it changed from procedure to function (my bad 😞 ) .

It does NFD as expected, but after cleaning it up it also strips the text out of any non-alphanumeric characters at this line.

I think there should be an option to toggle the stripping of non-alphanumeric characters.

For example if you want to clean a sentence, you need to split it, clean it word by word then join it back together.

@hvub
Copy link
Collaborator

hvub commented Dec 18, 2024

@hvub hvub closed this as completed Dec 18, 2024
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

2 participants