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
8
votes
3answers
296 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),...
21
votes
5answers
452 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 ...
0
votes
1answer
160 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: ...
47
votes
73answers
14k 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 ...
7
votes
13answers
516 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ú) ...
15
votes
13answers
2k 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 ...
24
votes
18answers
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 ...
2
votes
1answer
182 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). ...
11
votes
5answers
977 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 ...
32
votes
12answers
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 ...
12
votes
1answer
309 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 ...
6
votes
5answers
395 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 (...
17
votes
23answers
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. ...
12
votes
3answers
704 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 ...
9
votes
5answers
479 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–...
21
votes
25answers
3k 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-...
25
votes
4answers
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 ...
2
votes
1answer
204 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, ...
4
votes
2answers
347 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 ...
2
votes
1answer
240 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 ...
22
votes
9answers
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 ...
6
votes
2answers
288 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 ...
15
votes
12answers
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:...
8
votes
11answers
491 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 ...
39
votes
15answers
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 ...
10
votes
2answers
338 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 ...
8
votes
5answers
495 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 ...
1
vote
3answers
176 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. ...
16
votes
4answers
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 ...
15
votes
18answers
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 ...
25
votes
12answers
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 ...
7
votes
2answers
224 views

Check if a given string is valid romaji

Your program is given a string consisting entirely of lowercase letters at STDIN (or closest alternative). The program must then output a truthy or falsey value, depending on whether the input is ...
4
votes
1answer
232 views

Correct peoples grammar

(yes, that title was intentional) Your task is to correct common grammatical mistakes. You must: Capitalise the first letter of each sentence, ie the first non-whitespace letter after any of ...
37
votes
1answer
1k views

Guess how to pronounce German words

Introduction Unlike English, German is considered to have quite a phonemic writing system. That means that the correspondence between spelling and pronunciation is close. Given any word you aren't ...
17
votes
15answers
1k views

Find the Translation Table

Given two strings, find the translation table (substitution cipher) between the two, if the translation is not possible, output false. The answer must be minimized and created from left-to-right. The ...
25
votes
17answers
6k views

Convert singular to plural

There are two forms of nouns, singular and plural. The conversion between these two is quite easy. Normally, you end it with s. ex. ...
36
votes
18answers
5k views

Automate your first grade counting exercise

CodeGolf Challenge PWSSHHHH! You wake up in a cryogenics lab in the year 3000. Upon being escorted to the assignment office to receive your career chip, presumably that of a delivery boy, a probe ...
28
votes
1answer
415 views

Count spelling errors in text; minimize the number of spelling errors in your code

Write a program or function that takes two inputs: A text message The dictionary of English language, as it appears in this Github file (containing about 60000 words) and outputs the number of ...
10
votes
3answers
495 views

Find the shortest pangrams from a word list

A pangram is a string that contains every letter a-z of the English alphabet, case-insensitive. (It's OK if the pangram contains ...
19
votes
7answers
1k views

Alphabetize Integers

Alphabetize Integers For a given set of numbers, put them in alphabetical order when they are spelled out (i.e. 1: one, 2: two, 90: ninety, 19: nineteen). Your code should work for the range ...
12
votes
9answers
772 views

Multi-lingual Challenge

After all the fun we've had with polyglot challenges in the (recent) past, how about a challenge where the output can be in two languages? Your answer needs to accept boolean input ...
5
votes
3answers
252 views

My Pet Peeve Challenge

There's something (well, many things 😀) that really annoys me. It is when dictionaries (English, not Pythonic) use the defining word itself to define the word, also called circular definitions. ...
5
votes
2answers
390 views

Why don't you grow up?

Why don't you grow up? In the past week a meme involving the young actor Aaron Bailey became trending in most Brazilian social networks. Entitled "why don't you grow up" it consists in repeating a ...
17
votes
19answers
3k views

An A , or An An?

In English, there is the fun and simple difference between an and a: you use an when ...
37
votes
15answers
5k views

How long is a Welsh word?

Write a program or function which receives as input a string representing a Welsh word (UTF-8 unless otherwise specified by you). The following are all single letters in Welsh: a, b, c, ch, d, dd, ...
13
votes
6answers
522 views

Distance to four

This challenge is based on this video. I recommend that you watch it before trying this challenge. First we define a function. This function (OEIS) takes a integer n as input and outputs the number ...
16
votes
6answers
560 views

Golff y Côd - Treiglad

Read this yng Nghymraeg Challenge Given a word in Welsh, output all of the possible mutated forms of the word. Mutations A mutation is a change of the first letter of a word when following certain ...
10
votes
2answers
452 views

Conjugate a Turkish verb

Input verb, a string that matches the regular expression ([a-pr-vyzıöüçğş]*[aeıioöuü][bcçdfgğhj-nprsştvyz]+|([a-pr-vyzıöüçğş]*[aeıioöuü]){2})(mak|mek) plural, a ...
36
votes
17answers
6k views

Count to 100 in Danish

Print all the numbers from 0-100 in the right order using the Danish way of counting How they count Like English, they have dedicated words for 0-20, 30, 40 and 100 Instead of saying ...
10
votes
1answer
401 views

Scan dactylic hexameter in a unique puzzle

As a terrible Latin student for several years I have learned to hate many things about Latin. However there is one thing I love. Latin scansion. Scansion is the act of determining the meter of a ...