title: random.shuffle(someLazyMap)
body: <p>I'm currently trying to train my Python NLTK Part-Of-Speech Tagger to tag German text correctly. In order to do so I'm using of the ClassifiedBasedGermanTagger, from:</p>
  
  <p><a href="https://github.com/ptnplanet/NLTK-Contributions/tree/master/ClassifierBasedGermanTagger" rel="nofollow noreferrer">https://github.com/ptnplanet/NLTK-Contributions/tree/master/ClassifierBasedGermanTagger</a></p>
  
  <p>and a training corpus from this website:</p>
  
  <p><a href="http://www.ims.uni-stuttgart.de/forschung/ressourcen/korpora/TIGERCorpus/download/start.html" rel="nofollow noreferrer">http://www.ims.uni-stuttgart.de/forschung/ressourcen/korpora/TIGERCorpus/download/start.html</a>
  (TIGER Corpus Release 2.2 (July 2012))</p>
  
  <p>I found out that there is a pretty well written tutorial on how to go about this. So right now all I'm trying to do is to recreate the code:</p>
  
  <p><a href="https://datascience.blog.wzb.eu/2016/07/13/accurate-part-of-speech-tagging-of-german-texts-with-nltk/" rel="nofollow noreferrer">https://datascience.blog.wzb.eu/2016/07/13/accurate-part-of-speech-tagging-of-german-texts-with-nltk/</a></p>
  
  <p>The part that doesn't work for me is this:</p>
  
  <pre><code>tagged_sents = corp.tagged_sents() 
  random.shuffle(tagged_sents)
  </code></pre>
  
  <p>The error I get looks like this:</p>
  
  <pre><code>File "C:\somedude\lib\random.py", line 274, in shuffle
      x[i], x[j] = x[j], x[i]
  TypeError: 'LazyMap' object does not support item assignment
  </code></pre>
  
  <p>Do you have a workaround for this or even an explanation as to why it supposedly worked for the gentleman that wrote that tutorial and why it shows an error for me? Currently I'm using Python 3.</p>
  
  <p>Thank you all very much in advance.</p>