Tumgik
#ai processing
Text
python matching with ngrams
# https://pythonprogrammingsnippets.com def get_ngrams(text, n): # split text into n-grams. ngrams = [] for i in range(len(text)-n+1): ngrams.append(text[i:i+n]) return ngrams def compare_strings_ngram_pct(string1, string2, n): # compare two strings based on the percentage of matching n-grams # Split strings into n-grams string1_ngrams = get_ngrams(string1, n) string2_ngrams = get_ngrams(string2, n) # Find the number of matching n-grams matching_ngrams = set(string1_ngrams) & set(string2_ngrams) # Calculate the percentage match percentage_match = (len(matching_ngrams) / len(string1_ngrams)) * 100 return percentage_match def compare_strings_ngram_max_size(string1, string2): # compare two strings based on the maximum matching n-gram size # Split strings into n-grams of varying lengths n = min(len(string1), len(string2)) for i in range(n, 0, -1): string1_ngrams = set(get_ngrams(string1, i)) string2_ngrams = set(get_ngrams(string2, i)) # Find the number of matching n-grams matching_ngrams = string1_ngrams & string2_ngrams if len(matching_ngrams) > 0: # Return the maximum matching n-gram size and break out of the loop return i # If no matching n-grams are found, return 0 return 0 string1 = "hello world" string2 = "hello there" n = 2 # n-gram size # find how much of string 2 matches string 1 based on n-grams percentage_match = compare_strings_ngram_pct(string1, string2, n) print(f"The percentage match is: {percentage_match}%") # find maximum ngram size of matching ngrams max_match_size = compare_strings_ngram_max_size(string1, string2) print(f"The maximum matching n-gram size is: {max_match_size}")
4 notes · View notes
endlessmazin · 11 months
Text
Tumblr media
DELAUNAY
2K notes · View notes
sadisthetic · 6 months
Text
Tumblr media
limewire virus
778 notes · View notes
redslug · 6 months
Text
Tumblr media
704 notes · View notes
wanderlust-in-my-soul · 8 months
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
You idiot. The only person who loves you is me.
673 notes · View notes
mybrknhrtt · 1 month
Text
Tumblr media
- does a hunt that has no violence feed anyone? ✸
297 notes · View notes
the-stove-is-on-fire · 3 months
Text
Tending to my Instagram like a poor neglected house plant 😔 Why must it take so many spoons to maintain social media accounts
347 notes · View notes
ink-the-artist · 9 months
Note
so somehow it’s the first time I’ve seen your Dogs illustration from May. it’s very very cool and strongly reminds me of AI-generated art — did you use AI to inspire the shapes? or otherwise influence the piece somehow? interested in your process! very cool.
yes! some more directly reference ai images id generated than others lol
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
573 notes · View notes
sinlizards · 1 year
Photo
Tumblr media
Ambiguity
2K notes · View notes
mielplante · 10 months
Text
Tumblr media
huehuehueh
719 notes · View notes
ex0skeletal-undead · 11 months
Photo
Tumblr media
Melt by John "Jangus" Cambra
This artist on Instagram
718 notes · View notes
jenfoundabug · 2 months
Text
Tumblr media Tumblr media
Skippers are so freakin cute 🥰
Burnsius communis (common checkered skipper), Northern California
Blehhh 😛
150 notes · View notes
gentil-minou · 1 year
Note
why are you making such a big deal about people using ai to write fics lmao you act like its the end of the world. i do it and no ones caught on. there’s bigger things to cry about.
In a few years when you realize how much your "works" lack the intricacies and soul and depth of emotions that make us human, I hope you remember this and use it to grow.
I assure you, the person who is suffering the most from your use of an artifical generator to "write" and "create" is yourself.
I'm mourning the loss of someone who had the potential to use their real experiences and imagination to create something that touches others. I'm sad for you and the way you won't understand the struggle of creating art, and miss the most valuable lesson of all which is that the struggle is what makes art so incredible, so real, so human.
I'm sorry that you think a glorified search engine is a better writer than your own skills. I like to think I would have liked reading what you'd actually write. I think a lot of people who have appreciated that more. I'm sorry that you don't value your own skills enough, that you don't believe you're good enough to write on your own.
I'm sorry that you want so desperately to be liked and clicked on and praised that you are willing to lose what makes you you in favor of hollow attention that will undoubtedly fade away into nothing but empty words from an empty soul
I hope in ten years you realize what you lost by using a machine to regurgitate someone else's words for you. I hope that before then you create something that's all your own, that you share it the way art was meant to be created and shared. That you let yourself truly be heard.
1K notes · View notes
zxal · 6 months
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
So you guys have just been coping with this since 2019. Okay.
327 notes · View notes
nonbinary-octopus · 15 days
Text
another concept that I think would be interesting to explore in fic, is What do the Rimworld colonists think of the player?
What are you to them?
You design the colony, and they will build everything you lay out, no questions asked.
You decide what their priorities should be, and even if you make stupid decisions that put their lives in danger, they will follow that order without question.
You can give them a long to-do list, and the only reason they'll stop before completing it (aside from you telling them to stop), is if they physically cannot continue, because they're ready to collapse of hunger or exhaustion. Or are in such a bad mood they have a mental break.
Why are they so willing to obey you? What are you, that they trust you so unflinchingly, and let you dictate their lives?
You are capable of being in multiple places at once, as demonstrated when part of the colony is in a caravan several days' travel away, and yet you can instruct both groups in the same moment.
Time does not flow over you the same way that it does the colonists. There are times where you notice things too late, yes, but there are also times when, the very moment disaster strikes, you have a plan as though you were able to deliberate for hours during the span of a breath.
You have not aged. You were here when the first pod crash-landed, you bore witness as their children were born, you watched over them as they grew into adults, and you were there still, as your first colonists reached reached old age. You will be there for as many generations as exist in this land.
What are you?
118 notes · View notes
Text
Tumblr media
13hrs later… the sus shit is finished...
Tumblr media
...slowly take my "slathered in oil" beam off Leander for a second and aim it at Ais...
(Simpping aside: Oil is fuck hard to paint. Bottles confuse me. Anatomy is fucked. And I think God punished me with retribution thanks to this. Was it worth it... possibly...I might just use this as a banner....)
360 notes · View notes