Skip to content

Conversation

@julien-c
Copy link
Member

@julien-c julien-c commented Jun 29, 2023

Use case: perform parts-of-speech tagging in Esperanto

Code to test:

const classifyTokens = await pipeline("token-classification", "julien-c/EsperBERTo-small-pos");
await classifyTokens("Mi estas viro kej estas tago varma.");

Output:

[
  {
    entity: 'PRON',
    score: 0.9999696612358093,
    index: 1,
    word: 'Mi',
    start: null,
    end: null
  },
  {
    entity: 'VERB',
    score: 0.9770894050598145,
    index: 2,
    word: ' estas',
    start: null,
    end: null
  },
  {
    entity: 'ADJ',
    score: 0.7278493642807007,
    index: 3,
    word: ' viro',
    start: null,
    end: null
  },
  {
    entity: 'VERB',
    score: 0.9786341786384583,
    index: 6,
    word: ' estas',
    start: null,
    end: null
  },
  {
    entity: 'NOUN',
    score: 0.8334921002388,
    index: 7,
    word: ' tago',
    start: null,
    end: null
  },
  {
    entity: 'ADJ',
    score: 0.9996510148048401,
    index: 8,
    word: ' varma',
    start: null,
    end: null
  }
]

Consistent with server-side computation as seen on https://huggingface.co/julien-c/EsperBERTo-small-pos

image

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 29, 2023

The documentation is not available anymore as the PR was closed or merged.

@xenova xenova merged commit 6eb924b into huggingface:main Jun 29, 2023
@xenova
Copy link
Collaborator

xenova commented Jun 29, 2023

Perfect! 🚀

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

Successfully merging this pull request may close these issues.

3 participants