0

I've been trying to convert natural language strings into integers for use in a long short-term neural-network. I tried converting to binary, using a bag-of-words, and an associative-array with each letter corresponding to a prime-number.

how can I convert nl sentences, or just the topic of them, to word-vectors or an array of ints?

5
  • Have you looked at Wordnet and Framenet?
    – jlawler
    May 13, 2015 at 17:20
  • @jlawler I am aware of wordnet, not framenet. What I would love is an api I can call and get the word-vector from or a file I could download and do the lookup on my own would be better.
    – wordSmith
    May 13, 2015 at 20:23
  • Could you please phrase your question in the form of a question? May 18, 2015 at 1:18
  • @JamesGrossmann okay, done. Sorry about that.
    – wordSmith
    May 19, 2015 at 22:37
  • This looks like a programming question, not a linguistics question.
    – curiousdannii
    May 20, 2015 at 7:52

1 Answer 1

1

I don't have any sense of what you're after, but I have a theory which represents a part of sentence structure with the integers 0-3. The idea is to describe the parsing order of each sentence part with respect to other parts, with lowest numbered parts parsed first. The numbers correspond to the integers assigned to verb arguments in Relational Grammar. The numbers are opposite to the order of application for theories like Categorial Grammar, which represent sentence structure as the application of functions to arguments, where the highest numbered parts are the first applied to.

In effect, the numbers represent the embeddedness of parts of a tree structure.

9
  • And they'd help categorize the lexical parts according to what can occur with each.
    – jlawler
    May 13, 2015 at 17:19
  • 1
    @jlawler, no, not if you mean that items with the same level of embedding would interact in subcategorization. Not the way I have worked things out, because, for one thing, two nominal arguments of the same predicate never have the same level (that's the Stratal Uniqueness Law of RG).
    – Greg Lee
    May 13, 2015 at 18:05
  • Right, but there are a number of possible configurations and not all lexical items will occur in each. That's all -- and it's not much, given the complexity of the lexicon.
    – jlawler
    May 13, 2015 at 18:11
  • 1
    @jlawler I don't understand that.
    – Greg Lee
    May 13, 2015 at 18:13
  • 1
    @jlawler, oh, you mean that verbs can be represented as tree-sisters of their arguments-with-embedding-levels, so you can perhaps maintain the generalization that only sisters subcategorize? So, e.g., we could have a lexical entry (ps rule) S1 -> NP1 gives NP3 NP2 (using the numbers for grammatical relations), to tell us that "gives" takes an indirect object. If that is what you meant, then, yes, that's part of what I'd propose.
    – Greg Lee
    May 13, 2015 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.