Skip to content

Commit fac9daf

Browse files
committed
Update language and console output for the disable statements
1 parent b1e4cd0 commit fac9daf

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

docs/reference/word2vec.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<img style="display:block; max-height:20rem" alt="illustration of an equation with egg plus cat equals kitten" src="_media/reference__header-word2vec.png">
66
</center>
77

8+
## word2vec has been disabled
9+
We've intentionally disabled the word2vec function after recognizing it has the potential to produce harmful outputs while using the model files included in our examples. We'll consider reenabling the word2vec function along with changes to address these issues in a future release of ml5.js. You can find further updates about this topic on the [Twitter account](https://twitter.com/ml5js) and [GitHub](https://github.com/ml5js/ml5-library/issues/1238).
810

11+
---
912
## Description
1013

1114
Word2vec is a group of related models that are used to produce [word embeddings](https://en.wikipedia.org/wiki/Word2vec)</sup>. This method allows you to perform vector operations on a given set of input vectors.

src/Word2vec/index.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
Word2Vec
88
*/
99

10-
const word2vec = () => console.log(
11-
`We've intentionally disabled the word2vec function after recognizing it has the\
12-
potential to produce harmful outputs while using the model files included in our\
13-
examples. We plan to repair the issues in our implementation and examples for\
14-
word2vec. Once we've corrected the issues, we'll consider reenabling the word2vec\
15-
function in a future release of ml5.js You can find further updates on this topic\
16-
on the our Twitter account (https://twitter.com/ml5js) and <GITHUB ISSUE>.`,
17-
);
10+
const word2vec = () => {
11+
console.log('%cword2vec has been disabled', 'color: #A155FF; font-size: 16px');
12+
console.log(
13+
`We've intentionally disabled the word2vec function after recognizing it has the\
14+
potential to produce harmful outputs while using the model files included in our\
15+
examples. We'll consider reenabling the word2vec function along with changes to\
16+
address these issues in a future release of ml5.js. You can find further updates\
17+
about this topic on our Twitter account (https://twitter.com/ml5js) and GitHub\
18+
(https://github.com/ml5js/ml5-library/issues/1238).`,
19+
);
20+
};
1821

1922
export default word2vec;

0 commit comments

Comments
 (0)