# BERT for Word Segmentation

**URL:** <https://discuss.huggingface.co/t/bert-for-word-segmentation/18132>\
**Category:** Beginners\
**Created:** [May 19, 2022, 8:00am UTC](https://discuss.huggingface.co/t/bert-for-word-segmentation/18132 "2022-05-19T08:00:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johanna-k](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@johanna-k](https://discuss.huggingface.co/u/johanna-k)\
**Post date:** [May 19, 2022, 8:00am UTC](https://discuss.huggingface.co/t/bert-for-word-segmentation/18132/1 "2022-05-19T08:00:44Z")

</div>

Hey there!

I’m currently comparing different ways of word segmentation.  
I was wondering if I could simply fine-tune a pre-trained BERT and add like a classification layer on top, so that giving an expression it’s decomposed into its basewords, by labeling each char with b beginning, m middle, e end.  
thesunflower123 -\>[‘the’, ‘##sun’, ‘##flower’, ‘##12’, ‘##3’] → bmebmmmmmmmebme

I found some papers about Chinese word segmentation and tried to adapt some tutorials. But I’m not quite sure with which pre-trained model I should start or how to train it properly (on sentences?).

Would be thankful for any tips!
