How to Convert A LOT of Words in a List Into Strings

Hello everyone, does anyone know how to convert these words into strings without me having to do it one by one? I’m trying to get the whole English dictionary. This is just part of the list.Thank you.

local list = 

	{
		aaaarrrrgggghhhh 

		aaargh

		Aachen

		Aardman

		aardvark

		aardvarks

		aardwolf

		Aarhus

		Aaron

		Aaronson

		abacus

		abandon

		abandoned

		abandoning

		abandonment

		abandons

		abase

		abate

		abated

		abatement

		abating

		abattoir

		abattoirs

		Abba

		abbacy

		abberation

		abbey

		Abbie

		abbot

		abbots

		abbreviate

		abbreviated

		abbreviates

		abbreviating

		abbreviation

		abbreviations

		Abby

		abdicate

		abdicated

		abdicates

		abdication

		abdomen

		abducted

		abductees

		abducting

		abduction

		Abdul

		Abe

		abed

This looks like an XY problem.
First, what do you want to do by importing the entire dictionary?
Because if the goal is a translation, Roblox already has several tools ready for that.

The dictionary will be used for determining whether or not a player guessed an English word correctly with certain patterns like if “en” is in the word. It’s basically the game called “Word Bomb” on Roblox.

Ok, first of all, did you realize that there are almost 200,000 English words?
Do you intend to leave all strings inside the script source code?
Anyway, if you want to do so, you can use Sublime Text and use Multi-Select feature, or any editor with macro features.

1 Like

Alright, I’ll give it a try, thanks. So far I only found 20,000 words on the Internet, I didn’t know there was 200,000. Yes, I intend to put all the words in the script. I don’t think it will lag too much because I already tested it, so it should be fine. But if I find all 200,000 words, oh boy.

1 Like

How many words do you need to speak a language? - BBC News.

I found one in JSON format: GitHub - adambom/dictionary: A JSON representation of Webster's Unabridged Dictionary

2 Likes

You could try

local strings = {}
local words = --insert the table here

for i,v in pairs(words) do
   table.insert(strings, tostring(i))
end

Not sure if it will work though

1 Like

How would this work? He said he wanted to convert the words into STRINGS not tables. The strings variable is a table not string. Also, tostring(i) will make a number. Since the i stands for index. Which means number. So the tostring(i) will return a number that’s a string. Instead you would use the “v” since thats the value. But this still isn’t what OP wants.

My method would work best for OP. Since it’ll find the word that the player typed and if it does he can make it do whatever he wants. As you can see:

So what you said wont work since its a number. Instead of a string. Which is what chat messages are

Can’t you use table.concat to make a table into strings

1 Like

You COULD but op wants to find out if a player typed out a word in the table. Instead, table.concat makes it into one string with all values. Making it impossible to check if a player typed a value
image

Thanks for the help everyone but my problem has been resolved by @rogeriodec_games. It turns out Sublime Text has a special feature which can be used by clicking on “Edit” > “Line” > “Join Lines”. This feature will merge all the code you select into one line. I copied the words from Sublime Text and pasted it in a list in Roblox Studio.

Now the code looks like this:

local list = {
aaaarrrrgggghhhh aaargh Aachen Aardman aardvark aardvarks aardwolf Aarhus Aaron Aaronson abacus abandon abandoned abandoning abandonment abandons abase abate abated abatement abating abattoir abattoirs Abba abbacy abberation abbey Abbie abbot abbots abbreviate abbreviated abbreviates abbreviating abbreviation abbreviations Abby abdicate abdicated abdicates abdication abdomen abducted abductees abducting abduction Abdul Abe abed
}

All I had to do was put strings between the start and end of the second line.

@xFly_Flame1014 that might also work, thank you for the input.

@kinglol123468 thank you for the input. I do want to check if a player typed a word in a table but my main issue was I needed to put strings between lots of words in a table.

Thank you @rogeriodec_games for recommending Sublime Text.

1 Like

The words are not getting converted to tables, they are getting converted to strings and added to a table. This is what OP implied, so they wouldnt have to add the quotes manually.

I thought tostring(i) would work because the word is the index, not the value, like this

local table = {
   word = "something"
}

But since there is NO value, this doesnt actually work (v doesnt work either)