class_docstr: Return an aligned sentence object, which encapsulates two sentences
  along with an ``Alignment`` between them.
  
  Typically used in machine translation to represent a sentence and
  its translation.
  
      >>> from nltk.translate import AlignedSent, Alignment
      >>> algnsent = AlignedSent(['klein', 'ist', 'das', 'Haus'],
      ...     ['the', 'house', 'is', 'small'], Alignment.fromstring('0-3 1-2 2-0 3-1'))
      >>> algnsent.words
      ['klein', 'ist', 'das', 'Haus']
      >>> algnsent.mots
      ['the', 'house', 'is', 'small']
      >>> algnsent.alignment
      Alignment([(0, 3), (1, 2), (2, 0), (3, 1)])
      >>> from nltk.corpus import comtrans
      >>> print(comtrans.aligned_sents()[54])
      <AlignedSent: 'Weshalb also sollten...' -> 'So why should EU arm...'>
      >>> print(comtrans.aligned_sents()[54].alignment)
      0-0 0-1 1-0 2-2 3-4 3-5 4-7 5-8 6-3 7-9 8-9 9-10 9-11 10-12 11-6 12-6 13-13
  
  :param words: Words in the target language sentence
  :type words: list(str)
  :param mots: Words in the source language sentence
  :type mots: list(str)
  :param alignment: Word-level alignments between ``words`` and ``mots``.
      Each alignment is represented as a 2-tuple (words_index, mots_index).
  :type alignment: Alignment
class_docstr_tok: ["Return","an","aligned","sentence","object",",","which","encapsulates","two","sentences","along","with","an","``","Alignment","``","between","them",".","Typically","used","in","machine","translation","to","represent","a","sentence","and","its","translation",".",">",">",">","from","nltk.translate","import","AlignedSent",",","Alignment",">",">",">","algnsent","=","AlignedSent","(","[","'klein","'",",","'ist","'",",","'das","'",",","'Haus","'","]",",","...","[","'the","'",",","'house","'",",","'is","'",",","'small","'","]",",","Alignment.fromstring","(","'","0-3","1-2","2-0","3-1","'",")",")",">",">",">","algnsent.words","[","'klein","'",",","'ist","'",",","'das","'",",","'Haus","'","]",">",">",">","algnsent.mots","[","'the","'",",","'house","'",",","'is","'",",","'small","'","]",">",">",">","algnsent.alignment","Alignment","(","[","(","0",",","3",")",",","(","1",",","2",")",",","(","2",",","0",")",",","(","3",",","1",")","]",")",">",">",">","from","nltk.corpus","import","comtrans",">",">",">","print","(","comtrans.aligned_sents","(",")","[","54","]",")","<","AlignedSent",":","'Weshalb","also","sollten","...","'","-",">","'So","why","should","EU","arm","...","'",">",">",">",">","print","(","comtrans.aligned_sents","(",")","[","54","]",".alignment",")","0-0","0-1","1-0","2-2","3-4","3-5","4-7","5-8","6-3","7-9","8-9","9-10","9-11","10-12","11-6","12-6","13-13",":","param","words",":","Words","in","the","target","language","sentence",":","type","words",":","list","(","str",")",":","param","mots",":","Words","in","the","source","language","sentence",":","type","mots",":","list","(","str",")",":","param","alignment",":","Word-level","alignments","between","``","words","``","and","``","mots","``",".","Each","alignment","is","represented","as","a","2-tuple","(","words_index",",","mots_index",")",".",":","type","alignment",":","Alignment"]
docstr: Dot representation of the aligned sentence
docstr_tok: ["Dot","representation","of","the","aligned","sentence"]
code: def _to_dot(self):
      """
      Dot representation of the aligned sentence
      """
      s = "graph align {\n"
      s += "node[shape=plaintext]\n"
  
      # Declare node
      s += "".join(
          [f'"{w}_source" [label="{w}"] \n' for w in self._words]
      )
      s += "".join(
          [f'"{w}_target" [label="{w}"] \n' for w in self._mots]
      )
  
      # Alignment
      s += "".join(
          [
              f'"{self._words[u]}_source" -- "{self._mots[v]}_target" \n'
              for u, v in self._alignment
          ]
      )
  
      # Connect the source words
      for i in range(len(self._words) - 1):
          s += '"{}_source" -- "{}_source" [style=invis]\n'.format(
              self._words[i],
              self._words[i + 1],
          )
  
      # Connect the target words
      for i in range(len(self._mots) - 1):
          s += '"{}_target" -- "{}_target" [style=invis]\n'.format(
              self._mots[i],
              self._mots[i + 1],
          )
  
      # Put it in the same rank
      s += "{rank = same; %s}\n" % (
          " ".join('"%s_source"' % w for w in self._words)
      )
      s += "{rank = same; %s}\n" % (
          " ".join('"%s_target"' % w for w in self._mots)
      )
  
      s += "}"
  
      return s
  
imports: import subprocess
  from collections import namedtuple
label_desc: Use image node_id 7 for calling the AlignedSent obj's underlying member method code with example usage: obj._to_dot() and returns: s