class_docstr: Corpus reader for the XML version of the CHILDES corpus.
  The CHILDES corpus is available at ``https://childes.talkbank.org/``. The XML
  version of CHILDES is located at ``https://childes.talkbank.org/data-xml/``.
  Copy the needed parts of the CHILDES XML corpus into the NLTK data directory
  (``nltk_data/corpora/CHILDES/``).
  
  For access to the file text use the usual nltk functions,
  ``words()``, ``sents()``, ``tagged_words()`` and ``tagged_sents()``.
class_docstr_tok: ["Corpus","reader","for","the","XML","version","of","the","CHILDES","corpus",".","The","CHILDES","corpus","is","available","at","``","https",":","\/\/childes.talkbank.org\/","``",".","The","XML","version","of","CHILDES","is","located","at","``","https",":","\/\/childes.talkbank.org\/data-xml\/","``",".","Copy","the","needed","parts","of","the","CHILDES","XML","corpus","into","the","NLTK","data","directory","(","``","nltk_data\/corpora\/CHILDES\/","``",")",".","For","access","to","the","file","text","use","the","usual","nltk","functions",",","``","words","(",")","``",",","``","sents","(",")","``",",","``","tagged_words","(",")","``","and","``","tagged_sents","(",")","``","."]
docstr: Caclculate age in months from a string in CHILDES format
docstr_tok: ["Caclculate","age","in","months","from","a","string","in","CHILDES","format"]
code: def convert_age(self, age_year):
      "Caclculate age in months from a string in CHILDES format"
      m = re.match(r"P(\d+)Y(\d+)M?(\d?\d?)D?", age_year)
      age_month = int(m.group(1)) * 12 + int(m.group(2))
      try:
          if int(m.group(3)) > 15:
              age_month += 1
      # some corpora don't have age information?
      except ValueError as e:
          pass
      return age_month
  
imports: import re
  from collections import defaultdict
  from nltk.corpus.reader.util import concat
  from nltk.corpus.reader.xmldocs import ElementTree, XMLCorpusReader
  from nltk.util import LazyConcatenation, LazyMap, flatten
label_desc: Use image node_id 12 for calling the CHILDESCorpusReader obj's underlying member method code with example usage: obj.convert_age(age_year) and returns: age_month