Skip to content

Instantly share code, notes, and snippets.

View lancejpollard's full-sized avatar
😍
Lots of coding

Lance Pollard lancejpollard

😍
Lots of coding
View GitHub Profile

Source

This is a somewhat belated summary to the query I made about a month ago. The original query goes as follows:

James McCawley (1992) has suggested that there be no such category as >Adjective in Mandarin Chinese after failing to distinguish adjectives >from verbs with a list of universal properties. I like to know if >there are indeed languages without adjectives. Japanese and some >Sino-Tibetan languages can employ 'adjectives' as predicate without a >copula, just like Chinese. I wonder if there is any difficulty in >identifying adjectives in these languages. I will post a summary if >there is interest. > >Reference: >James McCawley (1992) Justifying part-of-speech assignments in > Mandarin Chinese. Journal of Chinese Linguistics 20, 2, > 211-46.

I received seven replies from the respondents below. Languages they cited are given along with the respondents' names according to the order their notes reached me. Many thanks to their responses.

John E. Koontz

@lancejpollard
lancejpollard / model.js
Created May 8, 2022 01:49
How your code ends up without a framework (SQL without a good model layer)
const { uniq, omit } = require('lodash')
const serialization = require('./serialization')
const knex = require('../../knex')
const toneText = require('../../../../../../drumwork/deck/tone')
const callText = require('../../../../../../drumwork/deck/call')
let objectKeyToIdMap
let objectIdToKeyMap
let languageMap
@lancejpollard
lancejpollard / sequences.csv
Created April 29, 2022 12:17
Complete List of N=5 Binary de Bruijn Sequences
sequence
00000100011001010011101011011111
00000100011001010011101101011111
00000100011001010011111010110111
00000100011001010011111011010111
00000100011001010110100111011111
00000100011001010110100111110111
00000100011001010110111010011111
00000100011001010110111110100111
00000100011001010111011010011111
@lancejpollard
lancejpollard / debruijn-graph.js
Last active April 21, 2022 09:40
Attempt at generating debruijn sequences from traversing debruijn graphs.
// http://web.mnstate.edu/goytadam/talks/DBS.pdf
const SIZE = 8
const vertices = getEveryBitPermutation(SIZE).reduce((m, x) => {
m.set(x.toString(2).padStart(SIZE, 0), new Array)
return m
}, new Map)
for (let [v, edges] of vertices) {
@lancejpollard
lancejpollard / debruijin-dynamic.js
Created April 21, 2022 02:12
Quick attempt at dynamically iterating over de Bruijn sequences.
class Iterator {
constructor(k, n) {
this.k = k // alphabetSize
this.n = n // wordSize
this.power = new Uint32Array(n + 1)
this.power[0] = 1;
for (let i = 1; i <= n; i++) {
this.power[i] = k * this.power[i - 1];
}
// ported from C from http://debruijnsequence.org/db/home
const MAX = 100
function isZeroes(a, n) {
for (let i = 1; i <= n; i++) {
if (a[i] === 1) {
return false;
}
}
// from https://www.klittlepage.com/2013/12/21/twelve-days-2013-de-bruijn-sequences/
import java.util.Random;
/**
* @author Kelly Littlepage
*/
public class DeBruijn {
/***
* Generate a De Bruijn Sequence using the recursive FKM algorithm as given
#include <Frigo/all>
#include <Frigo/all.cpp>
// from https://stackoverflow.com/questions/7365562/de-bruijn-like-sequence-for-2n-1-how-is-it-constructed/7369288#7369288
using namespace Frigo::Lang;
using namespace std;
class MagicNumberGenerator
{
const BINARY_LEADING_ZERO_TABLE = makeLeadingZeroTable()
const BINARY_TRAILING_ZERO_CONSTANT = 0x077cb531
const BINARY_TRAILING_ZERO_TABLE = makeDeBruijnTrailingZeroTable(5, BINARY_TRAILING_ZERO_CONSTANT)
function countTrailingZeroes32(n) {
return BINARY_TRAILING_ZERO_TABLE[((n & -n) * BINARY_TRAILING_ZERO_CONSTANT) >>> 27];
}
function countTrailingZeroes16(n) {
@lancejpollard
lancejpollard / debruijn.py
Created April 20, 2022 11:36 — forked from rgov/debruijn.py
de Bruijn sequence generator
def deBruijn(n, k):
'''
An implementation of the FKM algorithm for generating the de Bruijn
sequence containing all k-ary strings of length n, as described in
"Combinatorial Generation" by Frank Ruskey.
'''
a = [ 0 ] * (n + 1)
def gen(t, p):