# Tag Info

### Semantic readings of the Lambek sequent calculus

What constitutes a proof in a system like this is a derivation which is a tree of rule applications. The above translation function is defined by (structural) recursion over that tree. Note, this is ...
• 12.1k
Accepted

### How to express modalities in lambda calculus - are some extensions required?

Are extensions required? Not really. You can take an axiomatic description of a modal logic and simply provide a "primitive" lambda term for each. The modal operators would become type constructors. ...
• 12.1k
Accepted

### nlp: phonetic edit distance between a word and the closest of a set of words

Building on the comments, there's something called the Needlemanâ€“Wunsch algorithm, for which you can find the lowest 'cost' alignment of two sequences (phonemes). You can get a good 'confusion cost ...
• 231
Accepted

### An integer (a string of digits) is $\text{/[0-9][0-9]$\ast$/}$. (Why isn't it just $\text{/[0-9]$\ast$/}$?)

The empty word $\epsilon$ isn't an integer. Integers are $0, 1, 2, 3, \dots, 10, 11, \dots$ Clearly none of them have $0$ letters when you write them, and hence they are not $\epsilon$. Hence, you ...
• 11.6k

### Measuring the information of a document?

Assuming that your data comes from a Markovian source, you can estimate the entropy of the source using an optimal compression algorithm such as Lempelâ€“Ziv, whose theoretical version (without limiting ...
• 278k

### Examples for CFG that cannot be expressed by regular language

If no bracket language examples suffice, your quest is futile. Every context-free-language is a reduction of a bracket/parenthesis language. Reduction comprises homomorphism; intersection with a ...
• 626

### Examples for CFG that cannot be expressed by regular language

Theoretically, you can nest sentences arbitrarily depth, by using subclauses and this excluded any finite state mechanism. The inventor of the phrase structure grammars himself looked at finite state ...
• 1,449

### How does SpaCy make its dependency tree?

Matthew Honnibal, who created Spacy, answered me : The full answer is rather complicated :). I've written a few blog posts over the years to make it more accessible. The best place to start is ...

### How to transform lambda function to multi-argument lambda function and how to rewrite or approximate terms?

You are looking for currying and uncurrying which transform functions of type $A \times B \to C$ to functions of type $A \to (B \to C)$, and vice versa. Currying takes ...
• 31k
Accepted

### Subsampling of Frequent Words in Word2Vec

My guess is that we should regard $f(w_i)$ as a number between 0 and 1, i.e., the number of times word $w_i$ appears divided by the number of words. This makes it an estimate of the probability of ...
• 163k

### Advice needed. NLP and ML. Where to start?

Spell checking, grammar checking, proofreading with ML Norvig: How to Write a Spelling Corrector "Artistic Style Transfer" for articles (if it is even possible), i.e. "transfer" Shakespeare'...
• 2,360
Accepted

### Advice needed. NLP and ML. Where to start?

As far as I can see, your reading list lacks specific NLP introductions. A really good starting point is Dan Jurafsky and Chris Manning's Coursera course (for example here https://www.youtube.com/...
• 226

### Specific case of a ranking model

Build a boolean classifier that classifies a message as either "task" or "not a task". Choose a classifier that can output a confidence score (many classifiers can, including ensembles like random ...
• 163k

### Are there repositories of automatically generated (spam) webpages?

Question: Where can I access automatically generated (spam) webpages? You could use: a parody generator program. They're usually based on Markov chains (e.g. SubredditSimulator) or context-free ...
• 2,062

### If Large Language Models like ChatGPT grow, do also their problems grow?

First, it's important to understand that Chomsky is a linguist (a syntactician) and that the goals of linguistics are very different from artificial intelligence. In particular, the two domains differ ...
• 935

### Finding interesting anagrams

It doesn't cover the exact algorithm you had in mind (which Tsuyoshi Ito's answer does), but trying to get at the underlying problem of finding "interesting" anagrams... My first thought was to use ...
• 236

### How to compute the TF-IDF scores for a handful of documents, but without my own corpus?

Answer What do you value in a ranking function? If you don't value TF or IDF, then it'll be difficult for you to achieve what you want to achieve. Without a corpus however, you could use a frequency ...
• 251
Accepted

### How to represent text for a program to add punctuation to a block of text?

I am making two assumptions here about things that, to me, are not quite clear from your question When you say you removed punctuation, you actually meant whitespaces as well. You tried neural ...
• 226

### Applying Machine learning in biological data

A simple starting point would be to apply a bag-of-words feature vector and try using a naive Bayes or logistic regression classifier. You'll probably want to apply stemming and lemmatization and ...
• 163k
Accepted

### Understanding the geometrical interpretation of word2vec

If two words tend to appear in the same context, then they will tend to receive a similar word vector. For instance, a large corpus might contain sentences like "I really love Fuji apples" and "I ...
• 163k
Accepted

### Efficient search of a large set of documents to find documents that only contain a particular set of words

You are trying to compute the set $$E = \{e \in D \mid e \subseteq K \land e \cap S \ne \emptyset\}.$$ There is a naive algorithm. Store $K,S$ in a hashtable (using a hash function that maps each ...
• 163k