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

[new]: detect_lang(text) #168

Open
2 tasks done
pocman opened this issue Oct 7, 2024 · 1 comment
Open
2 tasks done

[new]: detect_lang(text) #168

pocman opened this issue Oct 7, 2024 · 1 comment
Labels
new-bigfunction Suggest a New BigFunction

Comments

@pocman
Copy link

pocman commented Oct 7, 2024

Check the idea has not already been suggested

Edit the title above with self-explanatory function name and argument names

  • The function name and the argument names I entered in the title above seems self explanatory to me.

BigFunction Description as it would appear in the documentation

Detect the language of the text using langdetect.
langdetect supports 55 languages out of the box (ISO 639-1 codes):

af, ar, bg, bn, ca, cs, cy, da, de, el, en, es, et, fa, fi, fr, gu, he,
hi, hr, hu, id, it, ja, kn, ko, lt, lv, mk, ml, mr, ne, nl, no, pa, pl,
pt, ro, ru, sk, sl, so, sq, sv, sw, ta, te, th, tl, tr, uk, ur, vi, zh-cn, zh-tw

Examples of (arguments, expected output) as they would appear in the documentation

text=War doesn't show who's right, just who's left. --> en
text=Ein, zwei, drei, vier --> de

@pocman pocman added the new-bigfunction Suggest a New BigFunction label Oct 7, 2024
@pocman pocman changed the title [new]: detect_langs(text) [new]: detect_lang(text) Oct 7, 2024
@unytics
Copy link
Owner

unytics commented Oct 7, 2024

Excellent idea @pocman

What do you think of using a javascript library for this function such as franc to get faster results (javascript udf do not need to have cloud run resources deployed)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bigfunction Suggest a New BigFunction
Projects
None yet
Development

No branches or pull requests

2 participants