_

class StochasticParrot {
  data = {};
  train(text) {
    const words = text.toLowerCase().split(/\s+/);
    words.forEach((w, i) => {
      if (words[i + 1]) (this.data[w] ??= []).push(words[i + 1]);
    });
  }
  complete(str, len = 5) {
    let res = str.toLowerCase().split(/\s+/);
    while (len--) {
      const next = this.data[res.at(-1)];
      if (!next) break;
      res.push(next[Math.floor(Math.random() * next.length)]);
    }
    return res.join(" ");
  }
}

Hi, I’m Marcus Felix. I develop digital products through the lens of design. By prioritizing human factors and purpose, I transform complex technical requirements into simple, intuitive experiences.

0 people
liked this website
1.

Work

Muun GmbH

2.

Side project

memoria

3.

Listening

Steely Dan

4.

Side project

Barney

5.

Reading

Fluent Forever

6.

Learning

German A2

7.

Gaming

Hytale

Articles