Skip to content

Not working for me :S #1

@jcguarinpenaranda

Description

@jcguarinpenaranda

Today I started working with fasttext-node and I wrote the following script in Typescript:

import * as FastText from 'fasttext-node'

async function main() {
  const fastext = new FastText({ logs: true })
  try {
    const trainResult = await fastext.train(
      './train.txt',
      {
        epoch: 50,
        model: 'my-training-model'
      }
    )

    const result = await fastext.predict(['Custard Pudding tasting like raw eggs'],
      { labelCount: 10 }
    )
  } catch (err) {
    console.log('Training data err', err)
  }
}

// execute the code
main();

The train.txt file is the same from the examples, and I hosted it on my local folder.

Issue 1

When I change the path of train.txt to https://raw.githubusercontent.com/jazzyarchitects/fasttext-node/master/train.txt, I get the following error:

captura de pantalla 2017-09-10 a las 11 31 40 a m

Issue 2

When I execute the piece of code I wrote, I get the following error:
captura de pantalla 2017-09-10 a las 11 33 19 a m

I like the way the API has been implemented, and I would really like to use this library. Please help me get it working

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions