Questions tagged [natural-language]

Problems involving processing of natural languages in a human way. Tasks include interpreting free text, correcting spelling or grammar, understanding pronunciation, etc.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
249 views

It's Just Simple Math! [duplicate]

Task Your boss is on another crusade for 'efficiency.' He wants to encourage the use of numbers with fewer syllables, so that they're easier to discuss in meetings. If you want to take some time off ...
I.T Delinquent's user avatar
12 votes
8 answers
971 views

Shortest English prompt to produce LLM falsehood [closed]

Since programming is predicted to become natural linguisized by the unstoppable advances in LLM technology, perhaps we can code golf LLMs themselves. Produce the shortest question that is not an ...
Innuo's user avatar
  • 237
11 votes
6 answers
998 views

Spell date in Japanese

Objective Given a date, spell it out in Romanized Japanese. I/O Format The input format is flexible. The output format is <month spelling> <day spelling>...
Dannyu NDos's user avatar
  • 5,447
14 votes
10 answers
3k views

When in {country}, do as the {countrians} do

(or: Output the plural demonym.) When in Rome, do as the Romans do. This is a well-known English phrase meaning that it’s best to follow what others are doing around you — to go with the flow. Today, ...
noodle man's user avatar
  • 5,212
11 votes
7 answers
2k views

Zahlen auf Deutsch! (Numbers in German)

Your task is to write a program that receives a base 10 number from 0 to 99 and outputs the German name of that number with non-ASCII characters replaced with ASCII equivalents. German number names <...
Creative Name's user avatar
6 votes
3 answers
397 views

Help Me Type on My New Keyboard

Overview As most of y'all who visit chat know, I am Russian by ethnicity[citation not needed]. Recently, I switched from a keyboard that maps the letters 1-to-1 (mnemonic) to Windows' default mnemonic ...
Seggan's user avatar
  • 5,271
13 votes
9 answers
1k views

Translate to plorcly borglar

plorcly borglar is a "mod" created by jan Misali for the constructed language toki pona that makes words sound funny. It involves substituting the 14 toki pona letters for funnier versions ...
Wheat Wizard's user avatar
  • 96.5k
8 votes
9 answers
1k views

Selective Caesar Cipher

Input A string of text. Output The string of text, however, every consonant is the next consonant in the alphabet, and every vowel is the next vowel in the alphabet (z becomes b, u becomes a). The ...
violetorigin's user avatar
5 votes
7 answers
866 views

Convert from Greeklish to modern Greek

Greeklish, a portmanteau of the words Greek and English, is a way of writing modern Greek using only ASCII characters. This informal way of writing was extensively used in older applications / web ...
solid.py's user avatar
  • 1,597
24 votes
10 answers
3k views

Tell me how many there are, in Polish

Today, you're going to be writing Polish. No, not Polish notation—Polish, the actual language spoken in Poland. Given a number and a noun, output a Polish sentence telling me that there are that many ...
Tanner Swett's user avatar
19 votes
12 answers
2k views

Detect Mongolian vowel harmony

The Mongolian language has "vowel harmony". In short the vowel harmony means that certain vowels are not allowed to be placed next to each other in a word. This means that suffixes of ...
Wheat Wizard's user avatar
  • 96.5k
15 votes
11 answers
784 views

Determine Uilta Pitch Accent

Uilta is a minority tungusic language spoken in the far east of Russia. A neat thing about Uilta is that it has pitch accent which can be predicted by a computer program. In this challenge we are ...
Wheat Wizard's user avatar
  • 96.5k
15 votes
8 answers
758 views

Organize a Kiowa library

We are probably all used to the English alphabetical order: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z When we compare words in English for the sake of ...
Wheat Wizard's user avatar
  • 96.5k
20 votes
7 answers
2k views

Find my Māori pronouns

The Māori language has quite simple pronouns. It uses a single word for he/she/they/etc (ia), and the words for "you" and "me" are ...
emanresu A's user avatar
  • 35.6k
10 votes
8 answers
605 views

Biggest katlani noun dictionary in 400 bytes

Katlani is a constructed language being designed in chat. In this challenge, your goal is to print the largest dictionary of katlani nouns possible in 400 bytes or less. Task In 400 bytes or less, ...
Rydwolf Programs's user avatar
17 votes
10 answers
1k views

Is this a word?

Toki pona is a minimalist constructed language, and thus it has minimalist phonotactics (rules describing what sounds make valid words). Toki Pona has 8 consonant sounds ...
Wheat Wizard's user avatar
  • 96.5k
11 votes
3 answers
306 views

Is it a valid line in "Girls & Boys"?

Intro Blur's song Girls & Boys featured the lines girls who are boys who like boys to be girls who do boys like they're girls, who do girls like they're boys ...
sugarfi's user avatar
  • 2,195
10 votes
44 answers
4k views

English An or A?

Given a string consisting of only upper and lower case letters, output an if it begins with a vowel, and a if not. For the ...
Alan Bagel's user avatar
  • 3,445
31 votes
30 answers
3k views

Display a number in Toki Pona

Toki Pona is a constructed language with 137ish words, designed to constrain the speaker to expressing ideas in a simple and straightforward manner, reducing ideas to more essential forms. Often, ...
les-citrons's user avatar
26 votes
5 answers
2k views

I before E, except after C

You may be aware of the famous old rhyme, "I before E, except after C". It is a rule taught to aid in the spelling of certain English words. Quoting Wikipedia: If one is not sure whether a ...
dingledooper's user avatar
  • 22.3k
41 votes
9 answers
5k views

Translate English to English

You have been hired by the American embassy in the UK to act as a translator. Being a programmer, you decide to write a program to do a bit of the work for you. You've found out that often just doing ...
user's user avatar
  • 287
7 votes
3 answers
674 views

Day of Week - Natural language processing and date parsing

You'll get a human-readable question matching one of the following syntaxes, and are expected to print/return the corresponding result. Finding similarities between the human-readable inputs and ...
Zsolt Szilagy's user avatar
23 votes
17 answers
2k views

A Portuguese sequence of integers

Context Consider the following sequence of integers: $$2, 10, 12, 16, 17, 18, 19, ...$$ Can you guess the next term? Well, it is \$200\$. What about the next? It is \$201\$... In case it hasn't become ...
RGS's user avatar
  • 14k
11 votes
2 answers
2k views

Distinguish English and Spanish with regular expressions

The task is to to compete for the shortest regex (in bytes) in your preferred programming language which can distinguish between English and Spanish with minimum 60%...
GirkovArpa's user avatar
12 votes
4 answers
2k views

Who's that pokemon (based on its etymology)?

As we all know, most Pokemon are created by combining some English (or Japanese) words; these words are the Pokemon's "etymology." For example, "charmander" is "char" and "salamander" put together. ...
soktinpk's user avatar
  • 4,472
12 votes
5 answers
543 views

Return a word with a prescribed sum of letters

Identify each letter of the English alphabet with the number denoting its position in the alphabet, that is, a = 1, b = 2, c = 3, ..., z = 26 (no distinction ...
Nik's user avatar
  • 145
0 votes
0 answers
174 views

Let's learn a bit French: 99 Bottles [duplicate]

The 99 bottles in French The lyrics of the song goes like this: ...
V-X's user avatar
  • 727
3 votes
0 answers
68 views

Counting syllables [duplicate]

Challenge Write code that, given an English word, outputs the number of syllables it has. Scoring will be determined by a combination of code length and accuracy. Rules The accuracy of the ...
Uri Granta's user avatar
  • 2,959
37 votes
10 answers
3k views

Interpret numbers very literally

To interpret a positive integer very literally, write it in English words (without "and"), replace hyphens with spaces, replace each resulting word with its number value, and concatenate the ...
the default.'s user avatar
  • 8,415
15 votes
3 answers
1k views

Translate a simple sentence from Toki Pona

Toki Pona is a linguist's code golf: A minimalist language with a vocabulary of around 120 words. Because of this, it has very few grammatical irregularities found in other languages, making it ideal ...
caird coinheringaahin g's user avatar
20 votes
5 answers
3k views

Print your char count in words, in many languages

This challenge is inspired by my earlier challenge "Create a program that prints the amount of characters it has, in words". This challenge's rules are simple: make a program that prints its ...
AndrewTheCodegolfer's user avatar
10 votes
3 answers
407 views

Print the full conjugation of a French verb

Given a string ending in either "er", "ir", or "re" (the "infinitive"), output the full conjugation of the string as a French verb in the seven simple tenses. For each tense (in the order given below),...
Purple P's user avatar
  • 1,527
24 votes
5 answers
617 views

How long's left?

How long's left? Recently, I was making pizza using a 5-minute timer on my phone. When someone walked in and asked me how long was left, I was confused for a moment at first as to how to answer the ...
Geza Kerecsenyi's user avatar
1 vote
1 answer
201 views

Find 77 7-letter Magic Words [closed]

A magic word is a word whose Braille spelling contains precisely 26 dots (because the Morse code alphabet can be circularly encoded within). For example: ...
BbJug's user avatar
  • 21
66 votes
103 answers
17k views

Dad jokes are fun

We all know the classic dad joke that goes something like this: Somebody says a sentence to describe their self (e.g. I'm tired or ...
moltarze's user avatar
  • 2,552
9 votes
13 answers
618 views

An Séimhiú agus an tUrú

An Séimhiú agus an tUrú In Irish Gaelic (Gaeilge) there are a number of ways that the start of a word can be changed. The most common of these are lenition (an séimhiú) and eclipsis (an t-urú) ...
Ciaran_McCarthy's user avatar
16 votes
13 answers
4k views

How many syllables in that number?

I'd love to take a number and know how many syllables are in it, when spoken in English. Let's limit this to positive integers which are less than one thousand. I'm British, so we're going to follow ...
AJFaraday's user avatar
  • 11.8k
26 votes
19 answers
5k views

PronunciationSort™

We all know of different fancy sorting algorithms, but none of these give us numbers in a way that's easy to pronounce. To remedy this, I propose using PronunciationSort™, the most natural way to sort ...
maxb's user avatar
  • 6,837
3 votes
1 answer
223 views

I won't not use no double negatives [closed]

The goal is to simplify sentences containing multiple negatives. Like with multiplying negative numbers, two negative words annihilate each other until at most one is left (doesn't matter which one). ...
DenDenDo's user avatar
  • 2,871
13 votes
5 answers
2k views

The Onion, or Not The Onion?

The Onion (warning: many articles are NSFW) is a satirical news organization that parodies traditional news media. In 2014, The Onion launched ClickHole (warning: also frequently NSFW), a satirical ...
user avatar
33 votes
12 answers
2k views

Pleasanortmanteaus

A portmanteau word is a combination of two words that takes part of each word and makes them into a single new word. For example, lion + tiger => liger. Let's write a program to generate portmanteaus ...
DLosc's user avatar
  • 38k
13 votes
1 answer
536 views

Self-enumerating pangrams

Pangrams The quick brown fox jumped over the lazy dog. This is an example of a pangram - a sentence that contains every letter of the alphabet at least once. A self-enumerating pangram is a ...
Rob's user avatar
  • 131
8 votes
8 answers
762 views

M_ss_ng Lette_s

Given this list of all the words in english and a string with s_me missi_g lett__s, find one way to fill in the letters. Do note that some words on the list contain special characters (...
pfg's user avatar
  • 875
19 votes
24 answers
2k views

Sort spelled-out serial numbers

Given a list of two or more spelled-out serial numbers of equal length greater than two, e.g. ...
Adám's user avatar
  • 29.9k
13 votes
3 answers
1k views

Romanize Korean

Yes, It's basically You're a Romanizer, Baby, but harder. like, way harder. Learning Korean is HARD. at least for a person outside Asia. But they at least have the chance to learn, right? What ...
Matthew Roh's user avatar
  • 5,353
10 votes
5 answers
658 views

Case-fold German

Given a German string and an indication of a case (lower/upper/title), fold the string to that case. Specifications Input will consist only of a–...
Adám's user avatar
  • 29.9k
25 votes
28 answers
4k views

Parse my Esperanto!

The famous constructed language Esperanto uses the Latin alphabet (mostly, see the linked wikipedia page for details). However, there are some characters with accents: ĉ, ĝ, ĥ, ĵ, ŝ, and ŭ. (C-...
AAM111's user avatar
  • 1,587
24 votes
4 answers
3k views

Ain't no thang! ...or is it?

Introduction Street talk can be really difficult to understand, in particular to programmers, who aren't known to be very streetwise. It is your job to create an interpreter to help us all survive ...
Antti29's user avatar
  • 969
2 votes
1 answer
224 views

Collatz's First Conjecture [duplicate]

Background The Collatz Conjecture is quite well-known. Take any natural number. Triple and increment if odd; cut in half if even. Repeat, and it will reach 1 eventually. This famous conjecture, ...
Khuldraeseth na'Barya's user avatar
4 votes
2 answers
429 views

FORTY TWO? SIX? NINE? Understand these and much more! [duplicate]

Given the written, spelled-out representation of an integer from 1 to 10^15-1 inclusive, convert it to an actual integer in ...
fireflame241's user avatar
  • 16.2k