Cannot import name Field from torchtext.data

Abdelkareem_Elkhateb: <p>from torchtext.data import Field<br>
I am using pytorch 1.13 and torchtext 0.12.0</p>

vdw: <p>Version 1.13 just works quite different now. You will need to check the docs and most recent examples/tutorials.</p>
<p>I would argue that it became more light-weight since it focuses on the important parts, and no longer on preprocessing steps like tokenization.</p>
<p>In short, FIELD is gone now. And to be honest, I prefer it that way.</p>

Abdelkareem_Elkhateb: <p>Thanks, i will check it.<br>
do you know useful resources to start with PyTorch or books?<br>
everything I found is with the legacy version and I am confused I am new to NLP</p>

vdw: <p>There is a minimal example in the <a href="https://pytorch.org/text/stable/vocab.html" rel="noopener nofollow ugc">docs</a>.</p>
<p>I actually prepared 2 simple Jupyter notebooks for my students that I don’t mind sharing. But it would have to wait until tomorrow. It’s late here :).</p>

Abdelkareem_Elkhateb: <p>Thanks in advance.<br>
I will be waiting for you to send them!</p>

vdw: <p>I’ve made 2 notebooks for download <a href="http://185.170.113.47/data/downloads/basic-torchtext-tutorial.zip" rel="noopener nofollow ugc">here</a>.</p>
<p>At some point this will all be on GitHub but it’s far from ready and polished. I hope it’s useful.</p>

Abdelkareem_Elkhateb: <p>thanks a lot, vdw for your help</p>

Abdelkareem_Elkhateb: <p>the link don’t open!</p>

IneedMrmeeseeks: <p>Can I also see the notebooks??<br>
I can not open the link.<br>
Thx again, vdw. <img src="https://discuss.pytorch.org/images/emoji/apple/sweat_smile.png?v=12" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20"></p>

vdw: <p>The link should work but I assume your browser blocks HTTP requests. I simply copied to my own virtual server; and I don’t have SSL certificates for that.</p>

IneedMrmeeseeks: <p>sry, my bad.<br>
By using Microsoft Edge, I can open and download the notebooks!!<br>
<img src="https://discuss.pytorch.org/images/emoji/apple/+1.png?v=12" title=":+1:" class="emoji only-emoji" alt=":+1:" loading="lazy" width="20" height="20"></p>

Srinjoy_Mukherjee: <p>Hey, I am using torchtext 0.15 and encountering the same error as author. Could you share the notebooks again. Sorry for the inconvenience caused, I am still new to this.</p>

vdw: <p>I’ve finally managed to upload some stuff to Github. You can check out the “Data Preparation” notebooks in <a href="https://github.com/chrisvdweth/nus-cs4246x/tree/master/3-neural-nlp" rel="noopener nofollow ugc">this repository</a>.</p>

Srinjoy_Mukherjee: <p>Thank you for the reply.I will look into it. Also , Can you suggest some tutorials(or notebooks) which will help me as a novice to get started?Thanks.</p>

vdw: <p>To get started with what exactly? <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=12" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>I assume you mean NLP stuff with Python, or do you already have a specific task/goal in mind? Well, I like to think the repository I’ve just linked can be useful. We share this as supplementary materials with out students in our NLP university course – but this course is not only about neural network topics, as you can see from the complete repository. Apart from that, there are hundreds of good online sources (incl. the tutorials on the PyTorch website and YouTube tutorials). Admittedly, not many are specific <code>torchtext</code>, if this is what you’re after. Given the most recent changes in <code>torchtext</code>, many existing online examples won’t work anymore. It might be best to check the code snippets in the <a href="https://pytorch.org/text/stable/index.html" rel="noopener nofollow ugc">website</a>.</p>

Srinjoy_Mukherjee: <p>Yes, I mean NLP specifically. I want to get acquainted with pytorch and torchtext , so that I can write my own models. I have started reading papers and architectures like RNN, LSTM. Thanks for the reply.</p>

vdw: <p>Just in case it’s still relevant, maybe <a href="https://github.com/chrisvdweth/nus-cs4248x/tree/master/3-neural-nlp" rel="noopener nofollow ugc">these</a> notebooks could be useful.</p>

Srinjoy_Mukherjee: <p>Thanks for the reply <a class="mention" href="/u/vdw">@vdw</a></p>