'Returns the annotated document whose id number is
``fn_docid``. This id number can be obtained by calling the
Documents() function.
The dict that is returned from this function will contain the
following keys:
- \'_type\'      : \'fulltextannotation\'
- \'sentence\'   : a list of sentences in the document
- Each item in the list is a dict containing the following keys:
- \'ID\'    : the ID number of the sentence
- \'_type\' : \'sentence\'
- \'text\'  : the text of the sentence
- \'paragNo\' : the paragraph number
- \'sentNo\'  : the sentence number
- \'docID\'   : the document ID number
- \'corpID\'  : the corpus ID number
- \'aPos\'    : the annotation position
- \'annotationSet\' : a list of annotation layers for the sentence
- Each item in the list is a dict containing the following keys:
- \'ID\'       : the ID number of the annotation set
- \'_type\'    : \'annotationset\'
- \'status\'   : either \'MANUAL\' or \'UNANN\'
- \'luName\'   : (only if status is \'MANUAL\')
- \'luID\'     : (only if status is \'MANUAL\')
- \'frameID\'  : (only if status is \'MANUAL\')
- \'frameName\': (only if status is \'MANUAL\')
- \'layer\' : a list of labels for the layer
- Each item in the layer is a dict containing the
following keys:
- \'_type\': \'layer\'
- \'rank\'
- \'name\'
- \'label\' : a list of labels in the layer
- Each item is a dict containing the following keys:
- \'start\'
- \'end\'
- \'name\'
- \'feID\' (optional)
:param fn_docid: The Framenet id number of the document
:type fn_docid: int
:return: Information about the annotated document
:rtype: dict'

def doc(self, fn_docid):

    try:
        xmlfname = self._fulltext_idx[fn_docid].filename
    except TypeError:
        self._buildcorpusindex()
        xmlfname = self._fulltext_idx[fn_docid].filename
    except KeyError:
        raise FramenetError(u'Unknown    document    id:    {0}'.format(fn_docid))
    locpath = os.path.join(u'{0}'.format(self._root), self._fulltext_dir, xmlfname)
    elt = XMLCorpusView(locpath, u'fullTextAnnotation')[0]
    info = self._handle_fulltextannotation_elt(elt)
    for (k, v) in self._fulltext_idx[fn_docid].items():
        info[k] = v
    return info
