I need to read the custom dataset in conll format
COLLABORATOR
Hi! We don't currently have a builder for parsing custom `conll` datasets, but I guess we could add one as a packaged module (similarly to what [TFDS](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/core/dataset_builders/conll/conll_dataset_builder.py) did). @lhoestq @albertvillanova WDYT?

In the meantime, you can use `Dataset.from_generator` to create a dataset as follows:
```python
from datasets import Dataset

# 2009 version
INPUT_COLUMNS = "ID FORM LEMMA PLEMMA POS PPOS FEAT PFEAT HEAD PHEAD DEPREL PDEPREL".split()

def read_conll(file):
    example = {col: [] for col in INPUT_COLUMNS}
    idx = 0
    with open(file) as f:
        for line in f:
            if line.startswith("-DOCSTART-") or line == "\n" or not line:
                if example[next(iter(example))]:
                    yield idx, example
                idx += 1
                example = {col: [] for col in INPUT_COLUMNS}
            else:
                row_cols = line.split()
                for i, col in enumerate(example):
                    example[col] = row_cols[i].rstrip()

# (optional) pass custom features with `features=Features(...)`
dset = Dataset.from_generator(read_conll, gen_kwargs={"file": "path/to/conll/file"})   
``` 
2022-09-26T19:15:43Z
https://github.com/huggingface/datasets/issues/5014#issuecomment-1258497934
https://api.github.com/repos/huggingface/datasets/issues/5014
IC_kwDODunzps5LAyeO
https://api.github.com/repos/huggingface/datasets/issues/comments/1258497934/reactions
2022-09-26T19:15:43Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1258497934
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
MEMBER
I think we could add a dedicated builder if you think this format is general enough.
2022-09-27T08:16:32Z
https://github.com/huggingface/datasets/issues/5014#issuecomment-1259150871
https://api.github.com/repos/huggingface/datasets/issues/5014
IC_kwDODunzps5LDR4X
https://api.github.com/repos/huggingface/datasets/issues/comments/1259150871/reactions
2022-09-27T08:16:32Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1259150871
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE



> I think we could add a dedicated builder if you think this format is general enough.

I think its functions are incomplete. It should have to_ Conll and from_ There are two methods of conll.
2022-10-07T10:14:13Z
https://github.com/huggingface/datasets/issues/5014#issuecomment-1271401835
https://api.github.com/repos/huggingface/datasets/issues/5014
IC_kwDODunzps5LyA1r
https://api.github.com/repos/huggingface/datasets/issues/comments/1271401835/reactions
2022-10-07T10:14:13Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1271401835
https://avatars.githubusercontent.com/u/39985245?v=4
https://api.github.com/users/shell-nlp/events{/privacy}
https://api.github.com/users/shell-nlp/followers
https://api.github.com/users/shell-nlp/following{/other_user}
https://api.github.com/users/shell-nlp/gists{/gist_id}
https://github.com/shell-nlp
shell-nlp
MDQ6VXNlcjM5OTg1MjQ1
https://api.github.com/users/shell-nlp/orgs
https://api.github.com/users/shell-nlp/received_events
https://api.github.com/users/shell-nlp/repos
https://api.github.com/users/shell-nlp/starred{/owner}{/repo}
https://api.github.com/users/shell-nlp/subscriptions
User
https://api.github.com/users/shell-nlp
public
I need to read the custom dataset in conll format
