faker icon indicating copy to clipboard operation
faker copied to clipboard

Generate a word from English dictionary instead of lorem list of words

Open ayoubfaouzi opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I need to generate real words from a dictionary to use inside a security project. The problem with the hard-coded list in `Lorem().Text()`` that it can be easy identified as fake data

I can understand that faker's point is to generate fake data, though it will be useful to also give an option to generate more realistic fake data when it comes to strings.

Describe the solution you'd like fake.Lorem().Word(min-length?) -> "apple"

Describe alternatives you've considered Completely random slice of letters or a ransom elements of lorem texts array is not suitable for my use case.

Check out this: https://raw.githubusercontent.com/tjarratt/babble/master/babble_windows.go

We don't need to grab the whole words from the dictionary as it will increase significantly the package size, for example words under 4 letters can be dropped.

ayoubfaouzi avatar Jun 15 '23 08:06 ayoubfaouzi

I have an idea using external APIs and I want to work on this issue, can you assign me?

dhfherna avatar Oct 25 '23 00:10 dhfherna

@dhfherna sure, go ahead

jaswdr avatar Oct 25 '23 13:10 jaswdr

Hi @jaswdr, I was reviewing the PR with my proposal to solve this issue, however, upon review I see that it did not pass the deepsource review, I identified some solutions that apply in recent versions of Go, that means that for older versions the compilation fails. In this case what can I do?

dhfherna avatar Oct 31 '23 19:10 dhfherna