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
14 votes
8 answers
732 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 ...
user avatar
  • 84.6k
19 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 ...
user avatar
  • 26.7k
9 votes
8 answers
517 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, ...
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 ...
user avatar
  • 84.6k
11 votes
3 answers
283 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 ...
user avatar
  • 2,035
8 votes
33 answers
3k 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 ...
user avatar
  • 3,053
28 votes
27 answers
2k 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, ...
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 ...
user avatar
  • 16.9k
38 votes
8 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 avatar
  • 9,266
7 votes
3 answers
611 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 ...
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 ...
user avatar
  • 13.8k
11 votes
2 answers
1k 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%...
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. ...
user avatar
  • 4,404
12 votes
5 answers
345 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 ...
user avatar
  • 145
0 votes
0 answers
140 views

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

The 99 bottles in French The lyrics of the song goes like this: ...
user avatar
  • 727
3 votes
0 answers
65 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 ...
user avatar
  • 2,929
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 ...
user avatar
  • 8,126
15 votes
3 answers
676 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 ...
user avatar
20 votes
5 answers
2k 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 ...
user avatar
9 votes
3 answers
375 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),...
user avatar
  • 1,447
24 votes
5 answers
600 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 ...
user avatar
1 vote
1 answer
193 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: ...
user avatar
  • 21
60 votes
96 answers
16k 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 ...
user avatar
  • 2,464
9 votes
13 answers
587 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ú) ...
user avatar
15 votes
13 answers
3k 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 ...
user avatar
  • 11.1k
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 ...
user avatar
  • 6,657
3 votes
1 answer
212 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). ...
user avatar
  • 2,861
12 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 ...
user avatar
  • 31.8k
13 votes
1 answer
475 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 ...
user avatar
  • 131
8 votes
7 answers
581 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 (...
user avatar
  • 835
17 votes
23 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. ...
user avatar
  • 27.1k
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 ...
user avatar
  • 5,271
10 votes
5 answers
628 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–...
user avatar
  • 27.1k
24 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-...
user avatar
  • 1,419
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 ...
user avatar
  • 959
2 votes
1 answer
215 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, ...
user avatar
4 votes
2 answers
420 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 ...
user avatar
  • 15.9k
2 votes
1 answer
268 views

Syllables in a Number [closed]

Make a program/function which takes in an integer from 0 to 999999999999 (inclusive) as input and returns how many syllables it has when spoken in English. Make your code short. Specification A ...
user avatar
  • 2,723
22 votes
9 answers
1k views

Is it a noun or not?

Given a string as input, determine whether it is a noun or not. You will be scored on the 1000 most common English words, by how many you correctly label as a noun or not. The program or function ...
user avatar
  • 41.3k
6 votes
2 answers
337 views

How many words are there?

English is such an inefficient language. We've got enormous words when there are plenty of two or three letter words we never used! As computer scientists, every keystroke matters. We need to be more ...
user avatar
14 votes
12 answers
1k views

A-Z in 10's, you see?

As a follow up to my previous challenge Count to 20 with Words!, we will once again be using the word list from that challenge to perform another task. This time, you will be exclusively using: https:/...
user avatar
7 votes
11 answers
521 views

Stream of Letters to Words

Given a string containing only letters (case-insensitive), split it into words of uniformly random lengths, using the distribution below, with the exception of the last word, which can be of any valid ...
user avatar
  • 13.5k
38 votes
15 answers
4k views

Count to 20 with Words!

Using the following length-separated lists of words: https://github.com/Magic Octopus Urn/wordListsByLength Print 1 word from each list of length n from 1 all the ...
user avatar
10 votes
2 answers
380 views

your Uncle help Drunk needs

Drunk Uncle (sorry M.E. and AUS for region lock) is a fictional character from Saturday Night Live. He often confuses words for others that sound like them. For this challenge you need to convert ...
user avatar
  • 6,536
8 votes
8 answers
809 views

Is the writer a man or woman?

One problem on a website like this is that you often don't know if you are talking to a male or female. However, you have come up with a simple NLP technique you can use to determine the gender of the ...
user avatar
  • 6,536
1 vote
3 answers
222 views

Greek Syllabication (Simplified)

INTRO Let's say you write a passage and you are close to the end of the line wanting to write down a large word. In most languages, you just leave some blank and move to the next line, like a sir. ...
user avatar
16 votes
4 answers
1k views

Lorem Ipsum Generator [closed]

Lorem Ipsum is placeholder text used when preparing layout without wanted to have content already filled. One of its key features over using some arbitrary text is that it is nonsense. It isn't even ...
user avatar
15 votes
18 answers
3k views

Copodope Gopolopfop

The Language: Oppification A funny language to speak is created by applying the following process to each word: Place op after each consonant. So ...
user avatar
  • 22.8k
27 votes
13 answers
3k views

Write a pluralization function for Russian

In English, nouns can take on two different forms depending on whether they are singular (one) or plural (anything else). For example, we would say "1 dog" but "2 dogs", "0 dogs", "57 dogs" and so ...
user avatar
  • 7,682