How to use the mleap.gensim.word2vec.MLeapWord2Vec function in mleap

To help you get started, we’ve selected a few mleap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github combust / mleap / python / mleap / gensim / tests.py View on Github external
def test_word2vec(self):

        tf_wv = MLeapWord2Vec(input_features='sentence', output_features='sentence_vector')

        sentences4word2vec_ = [
                    ['call', 'me', 'tomorrow'],
                    ['give', 'me', 'a', 'call', 'in',' the', 'after', 'noon'],
                    ['when', 'can', 'i', 'call'],
                    ['when', 'is', 'the', 'best', 'time', 'to', 'call'],
                    ['call', 'me', 'tomorrow', 'after', 'noon'],
                    ['i', 'would', 'like', 'a', 'call', 'tomorrow'],
                    ['do', 'not', 'call', 'until', 'tomorrow'],
                    ['best', 'time', 'is', 'tomorrow', 'after', 'noon'],
                    ['call', 'tomorrow', 'after', 'lunch'],
                    ['call', 'after', 'lunch', 'time'],
                    ['make', 'the', 'call', 'tomorrow'],
                    ['make', 'the', 'call', 'tomorrow', 'after', 'noon'],
                    ['make', 'the' 'call', 'after', 'lunch', 'time']
                ]