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.

25
votes
4answers
2k views

Golf Me An OOP!

Golf Me An OOP! Two important components of object-oriented programming are inheritance and composition. Together, they allow for creating simple yet powerful class hierarchies to solve problems. ...
36
votes
10answers
4k views

Tell me how many math problems I have to do!

My teacher always gives me the most complicated set of math problems for homework. Like: pg. 546: 17-19, 22, 26, pg. 548: 35-67 odd, 79, 80-86 even. And I want to ...
26
votes
19answers
4k views

My Word can beat up your Word

PROBLEM Given two words, find the winner in a digital root battle. Define the digital root of a word this way: Each letter of the alphabet is assigned a number: A = 1, B = 2, C = 3, ..., Z = 26 ...
9
votes
7answers
1k views

Program to Spoonerise words [duplicate]

A spoonerisation is swapping the first letter/pronounceable syllable of two or more words. Example: A lack of pies = A pack of lies. Bad salad = Sad ballad (ish) :) Challenge: Write a program to ...
54
votes
8answers
8k views

Is this even a word?

Your should write a program or function that takes a 4-character string as input and outputs a value indicating if the string is an English word or not. You are allowed to make mistakes in 15% of the ...
12
votes
43answers
5k views

Sign that word!

What is a Word Signature? The signature of a word are all of it's letters put in order - the signatures of this, hist and ...
38
votes
4answers
961 views

You're a Romanizer, Baby

Romanization of Japanese is converting Japanese text into Latin characters. In this challenge, you will be given a string of Japanese characters as input and expected to convert them to the correct ...
13
votes
6answers
508 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 ...
14
votes
10answers
2k views

Convert English to a number without built-ins or libraries

This challenge is similar to this other, however I made a restriction (see bold text below) that I think would made it much diffent and (I hope) fun either. The Challenge Write a program or a ...
-4
votes
29answers
885 views

Convert phrases to reverse style [duplicate]

The Challenge Convert a phrase of two words to reverse style: candy bar -> bar le candy. Specifications There will be one word (only ...
65
votes
21answers
12k views

Translate your English source code into a foreign language [closed]

I have noticed that there are a disproportionate number of computer languages based on English. I propose to fix this by translating existing computer languages into foreign languages! Pick a ...
13
votes
3answers
4k views

Guess the word (aka Lingo)

The goal of this challenge is to write a program able to guess a word in the smallest possible number of attempts. It is based on the concept of the Lingo TV show (http://en.wikipedia.org/wiki/Lingo_(...
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 ...
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 ...
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 ...
21
votes
4answers
10k views

How to count the syllables in a word

Input: You will be passed a string containing a single english word. All letters will be lowercase, and there will be no non-alphabetic characters in the string. Output: You will return an integer ...
17
votes
24answers
2k views

Sign that word 2!

Sign that word 2! Not that long ago, I posted a challenge called Sign that word!. In the challenge, you must find the signature of word, which is the letters put in order (e.g. The signature of ...
16
votes
27answers
3k views

Generate a pronounceable word

The challenge is simple: generate a word. Specifications: Word must be pronounceable. This is defined as "alternating between a consonant and a vowel." A consonant is one of the following letters: ...
28
votes
40answers
4k views

Find words containing every vowel

Your program must find all the words in this wordlist that contain all the vowels (a e i o u y). There are easy ways to do this, but I am looking for the shortest ...
25
votes
3answers
1k views

¿xu ti te gismytermorna? (Is it a valid gismu?)

(Literally: "Does this follow/realize the gismu-form?") Premise The language Lojban is a constructed language, meaning in part that all of its words have been created rather than allowed to develop ...
15
votes
2answers
1k views

Books full of nonsense: Identify limericks

As we all know, limericks are short, five-line, occasionally-lewd poems with an AABBA rhyming scheme and an anapestic meter (whatever that is): Writing a Limerick's absurd Line one and line five ...
5
votes
4answers
1k views

Perfect Hangman in reverse

This is similar to other hang-man style problems already posted, except, in this case, the computer is the one guessing. Computers are logical, smart, and consider self-preservation to be important, ...
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, ...
21
votes
3answers
2k views

Distinguish between Masculine and Feminine Nouns in French within 100 characters

You are to write a very small program within 100 characters. Your program must distinguish between masculine and feminine french nouns. The output should be un if ...
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 ...
16
votes
6answers
556 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 ...
14
votes
5answers
346 views

Text Processing #1: Hyphenation

Background This is the first part of a 3-hole golf course on text processing. The over-arching idea is that if you take an input text and pipe it through the solutions to all three challenges (with a ...
13
votes
3answers
723 views

Decompose words into other words (e.g., “afterglow” = “aft” + “erg” + “low”)

Here's one for all you wordsmiths out there! Write a program or function which takes a list of words and produces a list of all possible concatenative decompositions for each word. For example: (Note:...
12
votes
3answers
688 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 ...
10
votes
1answer
398 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 ...
8
votes
8answers
602 views

Reverse Greek Conversion Golf

Introduction You must create a function to convert Greek numerals into Arabic numerals. The input will be a Greek numeral less than 1000 and more than ...
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 ...
21
votes
4answers
893 views

Telling time in French

Bonjour, PPCG ! Quelle heure est-il ? This means what time is it in French, for that is exactly what this challenge is about. Telling time in French (at least formally) is a bit different from ...
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-...
13
votes
4answers
505 views

Conjugate in the Spanish imperfect / Conjugue en el imperfecto de indicativo

Given an input of a Spanish verb in its infinitive form, output the verb conjugated in all 6 forms of the indicative imperfect. To conjugate an infinitive in the imperfect, remove the infinitive ...
13
votes
5answers
917 views

Build a readability index

The Flesch-Kincaid readability algorithm depends on the measures of word count and syllable count, neither of which is entirely objective, or easily automatable using a computer. For example, does "...
8
votes
9answers
1k views

Greek Conversion Golf

Introduction You must create a function to convert Arabic numerals into Greek numerals. The input will be an integer less than 1000 and more than ...
6
votes
5answers
684 views

Grow words from fertile vocabularies

An incremental word chain is a sequence of words of a vocabulary such that each word is the result of either prepending or appending a single character to the previous word, ignoring capitalization. ...