How to import sentencex in Observable?

I’ve tried to import the sentencex js library into Observable. The import cell works but I don’t how to reproduce the basic example from the documentation.

I guess I’m missing something.

The segment function is exported as the default symbol, so you need:

segment = import("https://cdn.skypack.dev/sentencex@0.4.2").then(d => d.default)
...
segment("en", text)
1 Like

Thank you so much. It works!

Here is the outcome Hello, sentencex / PAC | Observable

1 Like