36 ms·
Arguably that line of Python wouldn't do very good - you'd want choices that maximize the difference as opposed to be merely something random, this is harder th
by PeterisP 5y ago
Arguably that line of Python wouldn't do very good - you'd want choices that maximize the difference as opposed to be merely something random, this is harder than it appears; and the distribution of words is also uneven enough (both in relative frequency of word usage, and also in lexeme "density" w.r.t how many terms there are for some domains and how few for others) that pure random sampling would be not a good option.
- MattGaiser 5y agoIt does pretty well on this (https://www.datcreativity.com/task https://www.datcreativity.com/task?), at least with the below code. Consistently getting 80-90%. https://github.com/MattGaiser/CreativeWordChoice/tree/master/ https://github.com/MattGaiser/CreativeWordChoice/tree/master... I just grabbed a random list of nouns, narrowed it by the params specified, and fed them in as required. You may need more than 10 as it rejects some, but in that case I just re-ran it and put in the first nouns to come up.
- wongarsu 5y agoWord frequencies follow a power law, so nearly all words are used very infrequently. So a randomly chosen word is likely to be very uncommon. Also there are many more specific concepts than general ones (because each general concept encompasses many specific ones). So a randomly chosen word is more likely to be specific than general. Random sampling is likely to give you unusual, highly specific words. I don't see how that wouldn't do very good. Sure, you could do better by mapping each word to a concept, then selecting ten random concepts and selecting a word for each concept. But why do that when you get 99% of the way there with just random choice. To show this experientially, I let python choose 10 random words from the first English word list I found. I got "epilithic, codirects, serologic, capsian, digestibility, yasna, samsara, supergun, hepatoptosis, kyurin". Sure, capsian and kyurin are somewhat related (names of places/people), as are serologic and hepatoptosis (both medical terms), but it's a pretty good spread.
- rich_sasha 5y agoNot poster but I think the point is you could do better, not that this doesn’t work. You can imagine having some discrete optimisation maximising the dissimilarity of words, though that’s hard to do, in particular in a discrete space.
- PeterisP 5y agoThe example you got was the exact thing I had in mind - there are "terminology-heavy" fields with lots of terms, and a random draw is quite likely to draw two items from a single field which IMHO should count as quite related. The automated scoring method they're using seems to say that all obscure words are unrelated to each other, though, but I'd use that as a criticism for that evaluation algorithm not as praise for the evaluated method. On the other hand, probably there are many humans who would pick two local animals or two office-related objects that happen to be in their room, so that cuts both ways.
- Mumps 5y agoYeah, a random sample won't be (numerically) ideal, but given the size of the set, probably safe. A really quick and easy way to optimise this would be to just grab a well-trained word embedding space and pick _k_ furthest words by your favourite distance metric.