Add configurable options to `seqeval` metric
{'login': 'marrodion', 'id': 44571847, 'node_id': 'MDQ6VXNlcjQ0NTcxODQ3', 'avatar_url': 'https://avatars.githubusercontent.com/u/44571847?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/marrodion', 'html_url': 'https://github.com/marrodion', 'followers_url': 'https://api.github.com/users/marrodion/followers', 'following_url': 'https://api.github.com/users/marrodion/following{/other_user}', 'gists_url': 'https://api.github.com/users/marrodion/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/marrodion/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/marrodion/subscriptions', 'organizations_url': 'https://api.github.com/users/marrodion/orgs', 'repos_url': 'https://api.github.com/users/marrodion/repos', 'events_url': 'https://api.github.com/users/marrodion/events{/privacy}', 'received_events_url': 'https://api.github.com/users/marrodion/received_events', 'type': 'User', 'site_admin': False}
[]
[]
Hi @marrodion. 

Thanks for pointing this out. It would be great to incorporate this metric-specific enhancement.

Another possibility would be to require the user to input the scheme as a string `mode="strict", scheme="IOB2"` and then dynamically import the corresponding module using Python `importlib`:
```python
if scheme:
    scheme = importlib.import_module(f"seqeval.scheme.{scheme}")
```

Feel free to create a Pull Request to make this contribution.
Right now `load_metric("seqeval")` only works in the default mode of evaluation (equivalent to conll evaluation).

However, seqeval library [supports](https://github.com/chakki-works/seqeval#support-features) different evaluation schemes (IOB1, IOB2, etc.), which can be plugged in just by supporting additional kwargs in `Seqeval._compute`
https://github.com/huggingface/datasets/blob/85cf7ff920c90ca2e12bedca12b36d2a043c3da2/metrics/seqeval/seqeval.py#L109

Things that would be relevant are, for example, supporting `mode="strict", scheme=IOB2` to count only full entity match as a true positive and omit partial matches.

The only problem I see is that the spirit of `metrics` seems to not require additional imports from user. `seqeval` only supports schemes as objects, without any string aliases. 

It can be solved naively with mapping like `{"IOB2": seqeval.scheme.IOB2}`. Or just left as is and require user to explicitly import scheme from `seqeval` if he wants to configure it past the default implementation.

If that makes sense, I am happy to implement the change.
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/2148/reactions', 'total_count': 2, '+1': 1, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 1, 'rocket': 0, 'eyes': 0}