Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenCountVectorizer give null as result #7

Open
oitsuki opened this issue Jun 18, 2023 · 0 comments
Open

TokenCountVectorizer give null as result #7

oitsuki opened this issue Jun 18, 2023 · 0 comments

Comments

@oitsuki
Copy link

oitsuki commented Jun 18, 2023

tested via the documentation on latest php-ml

$vectorizer = new TokenCountVectorizer(new WhitespaceTokenizer());

$samples = [
  'Lorem ipsum dolor sit amet dolor',
  'Mauris placerat ipsum dolor',
  'Mauris diam eros fringilla diam',
];

// Build the dictionary.
$vectorizer->fit($samples);

// Transform the provided text samples into a vectorized list.
$test = $vectorizer->transform($samples);

var_dump($test); ===> null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant