Questions tagged [linguistics]

Linguistics is the scientific study of language and its structure, including the study of morphology, syntax, phonetics, and semantics.

Linguistics is the scientific study of language and its structure, including the study of morphology, syntax, phonetics, and semantics.

Specific branches of linguistics include sociolinguistics, dialectology, psycholinguistics, computational linguistics, historical-comparative linguistics, and applied linguistics.

303 questions
96
votes
23 answers

How can I correctly prefix a word with "a" and "an"?

I have a .NET application where, given a noun, I want it to correctly prefix that word with "a" or "an". How would I do that? Before you think the answer is to simply check if the first letter is a vowel, consider phrases like: an honest mistake a…
ryeguy
  • 60,742
  • 51
  • 186
  • 256
63
votes
1 answer

Linguistic meaning of 'let' variable in programming

So, I'm a javascript programmer and the new version of JavaScript (ES6) has a new keyword for declaring variables: let, next to the old one var. I know the difference between these two, but I was asking myself: what does let stand for? var…
ngstschr
  • 1,667
  • 1
  • 16
  • 31
32
votes
4 answers

How can I programmatically generate Heroku-like subdomain names?

We've all seen the interesting subdomains that you get automatically assigned when you deploy an app to Heroku with a bare "heroku create". Some examples: blazing-mist-4652, electric-night-4641, morning-frost-5543, radiant-river-7322, and so on. It…
dkulchenko
  • 560
  • 5
  • 11
30
votes
4 answers

Selecting the most fluent text from a set of possibilities via grammar checking (Python)

Some background I am a literature student at New College of Florida, currently working on an overly ambitious creative project. The project is geared towards the algorithmic generation of poetry. It's written in Python. My Python knowledge and…
driftcatcher
  • 1,981
  • 4
  • 26
  • 44
22
votes
13 answers

How do I determine if a random string sounds like English?

I have an algorithm that generates strings based on a list of input words. How do I separate only the strings that sounds like English words? ie. discard RDLO while keeping LORD. EDIT: To clarify, they do not need to be actual words in the…
Ozgur Ozcitak
  • 9,719
  • 7
  • 41
  • 56
20
votes
1 answer

How do I identify the part of speech of a word within a NSString?

The app I'm currently working on requires me to determine the part of speech of a word in NSString. So basically is there a library/database/class which you can access in Objective C which allows one to check if a single word (in the form of a…
Charles
  • 493
  • 7
  • 14
19
votes
6 answers

Algorithm for Negating Sentences

I was wondering if anyone was familiar with any attempts at algorithmic sentence negation. For example, given a sentence like "This book is good" provide any number of alternative sentences meaning the opposite like "This book is not good" or even…
Kevin Dolan
  • 397
  • 1
  • 3
  • 7
18
votes
6 answers

Finding the "best" combination for a set

I have a set, sentences, which contains sentences from the English language in the form of strings. I wish to create a subset of sentences, sentences2, which contains sentences containing only 20 unique words. Of course, there are many, many such…
Baz
  • 10,775
  • 30
  • 121
  • 236
15
votes
2 answers

Is there an online application that automatically draws tree structures for phrases/sentences?

i.e., it takes any sentence/phrase as input and automatically figures out the tree diagram. I'm looking for a way to see the tree structures for sentences/phrases whose tree structures I'm unsure of how to draw.
dmonopoly
  • 2,905
  • 4
  • 30
  • 47
14
votes
1 answer

English Language Dictionary api

Is there a public API which would let me lookup definitions for words ? I've been searching for this for a bit but it's getting mixed up with the dictionary datastructure. I'm planing on using it in a c# app. Thanks
Bala R
  • 101,930
  • 22
  • 186
  • 204
14
votes
7 answers

Algorithm to choose random letters for word search game that allows many words to be spelled

I'm making a boggle-like word game. The user is given a grid of letters like this: O V Z W X S T A C K Y R F L Q The user picks out a word using any adjacent chains of letters, like the word "STACK" across the middle line. The letters used are then…
BobbyJim
  • 707
  • 1
  • 7
  • 13
14
votes
5 answers

Translating human languages in Python

Is there a Python module for the translation of texts from one human language to another? I'm planning to work with texts that are to be pre and post processed with Python scripts. What other Python-integrated approaches can be used?
Alex
  • 37,703
  • 43
  • 90
  • 124
13
votes
2 answers

Find words and combinations of words that can be spoken the quickest

I'm a big fan of discovering sentences that can be rapped very quickly. For example, "gotta read a little bit of Wikipedia" or "don't wanna wind up in the gutter with a bottle of malt." (George Watsky) I wanted to write a program in Python that…
Parseltongue
  • 9,008
  • 26
  • 78
  • 131
13
votes
6 answers

Monitor brands with common words

Let's say you should monitor the brand "ONE" online. What algorithms can be used to separate pages about the brand ONE from pages containing the common word ONE? I'm thinking maybe Bayes could work, but are there other ways to do this?
Christian Davén
  • 13,902
  • 10
  • 53
  • 68
12
votes
3 answers

Thesaurus class or API for PHP [edited]

TL;DR Summary: I need a single command-line application which I can use to get synonyms and other related words. It needs to be multi-lingual and works cross platform. Can anyone suggest a suitable program for me, or help me with the ones I've…
Spudley
  • 157,081
  • 38
  • 222
  • 293
1
2 3
20 21