I have 2 data frames which needs to compare df_1 to df_2 and get similar string from df_2 of col_2 and store their number of phrases matched in df_out data frame
col_1 = c("inside the world,worldwide web,google chrome app","world health organisation, from country", "team work","size of the country, bigger compared to other")
df_1 = data.frame(col_1)
col_2 = c("team work,in the company", "size of the country","inside the world,worldwide web,google chrome app", "google chrome app,worldwide web,inside the world","inside the world,google chrome app", "web worldwide","world health organisation, from country","from country",
"size of the country, bigger compared to other","country from", "world health organisation,country from")
df_2 = data.frame(col_2)
col_1 = c("inside the world,worldwide web,google chrome app","inside the world,worldwide web,google chrome app", "inside the world,worldwide web,google chrome app","inside the world,worldwide web,google chrome app", "world health organisation, from country","world health organisation, from country", "world health organisation, from country","world health organisation, from country",
"team work","size of the country, bigger compared to other","size of the country, bigger compared to other", "inside the world,worldwide web,google chrome app", "world health organisation, from country")
col_2 = c("inside the world,worldwide web,google chrome app","inside the world,google chrome app",
"google chrome app,worldwide web,inside the world", "web worldwide", "world health organisation, from country","from country", "country from", "world health organisation,country from","team work,in the company", "size of the country, bigger compared to other","size of the country","team work,in the company", "web worldwide")
match_percentage = c("1/1","2/3","3/3","1/3","2/2","1/2","1/1","2/2","1/1","2/2","1/2","0/3","0/2")
match_numeric_percentage = c(100,66.666,100,33.3333,100,50,100,100,100,100,50,0,0
)
df_out = data.frame(col_1,col_2,match_percentage,match_numeric_percentage)