Wroks like /Roma/what-will-be-the-text-of-the-next-t with following changes:
distance is calculated using the python Levenshtein library with weights insertion = 4, deletion = 2, substitution = 3 to promote getting a part of the answer right
words (after converting to lowercase and removing special characters, delimited by spaces) must in either the official Scrabble dictionary or in Trump's previous tweets (lowercase, removing special characters, hashtags, @ tags, retweets, and links, longer than 3 letters) or be "rationalussy". for calculation it will also have spaces removed.
the next tweet will be converted to lowercase, have links, @ tags, spaces, and special characters removed, if that leaves <10 characters it will be skipped.
please do not use short words to create nonsense sequences that test well, I might disqualify clear cases of doing so
You can check if your response is valid here: https://app.codingrooms.com/w/fEW9njrH7cEn (click "FORK" in the top right corner and change "YOUR RESPONSE HERE")
🏅 Top traders
# | Name | Total profit |
---|---|---|
1 | Ṁ2,679 | |
2 | Ṁ65 | |
3 | Ṁ23 | |
4 | Ṁ18 | |
5 | Ṁ9 |
People are also trading
I made a couple of alternative markets for embedding distance: https://manifold.markets/PeterBuyukliev/what-will-trump-tweet-about-embeddi https://manifold.markets/PeterBuyukliev/what-will-kamala-tweet-about-embedd I think it's a pretty interesting concept. You can bet on the meaning of the tweets, instead of the words used
import re
tweet = """Are you better off now than you were when I was president?
Our economy is shattered. Our border has been erased. We're a nation in decline.
Make the American Dream AFFORDABLE again. Make America SAFE again. Make America GREAT Again! """
tweet = re.sub(r'[^a-z]', '', tweet.lower())
targets = [
"The interference",
"witnessing election interference not crime crooked democrats sad",
"in the more america treat rain or economy it and rose no as liar beit this together an it hope country deletion end this the are winning biden polls be america great again",
"Rationalussy",
"NATO teases. Note I'd have a peace treaty by now. Atone by 2024 or Nate Silver will be irate.",
"WE WILL WIN!",
"Failed election justice no not sad democrats big make America great again"
]
targets = [re.sub(r'[^a-z]', '', target.lower()) for target in targets]
print(targets)
def levenshtein_distance(s1, s2):
if len(s1) < len(s2):
return levenshtein_distance(s2, s1)
if len(s2) == 0:
return len(s1)
previous_row = range(len(s2) + 1)
for i, c1 in enumerate(s1):
current_row = [i + 1]
for j, c2 in enumerate(s2):
insertions = previous_row[j + 1] + 1
deletions = current_row[j] + 1
substitutions = previous_row[j] + (c1 != c2)
current_row.append(min(insertions, deletions, substitutions))
previous_row = current_row
return previous_row[-1]
for target in targets:
distance = levenshtein_distance(tweet, target)
print(f"The Levenshtein distance between the tweet and '{target}' is: {distance}")
@CodeandSolder this should close and resolve
https://x.com/realDonaldTrump/status/1822889460243001547
from the valid candidates, the Nate Silver one does best
edit: no, i was wrong, the other one is better
You led me astray lmao
@CodeandSolder I did accidentally slip in a 2 letter word.. more trying to participate for fun than get a win, change the criteria however you want. Won’t bother me
@Gen yeah, your answer is OK, I certainly won't disqualify you, I'll just remove the rule and add a polite request not to abuse short words
@CodeandSolder I’d also be okay if you ignored the word in testing, though idk how that works with your script.
I was trying to get into trumps head, no master plan behind it lol