class_docstr: Interface to ConceptNet, a multilingual knowledge base representing common words
  and phrases and the common-sense relationships between them.
  
  Download the data (one time only!), and save its contents to disk::
  
      >>> import textacy.resources
      >>> rs = textacy.resources.ConceptNet()
      >>> rs.download()
      >>> rs.info
      {'name': 'concept_net',
       'site_url': 'http://conceptnet.io',
       'publication_url': 'https://arxiv.org/abs/1612.03975',
       'description': 'An open, multilingual semantic network of general knowledge, designed to help computers understand the meanings of words.'}
  
  Access other same-language terms related to a given term in a variety of ways::
  
      >>> rs.get_synonyms("spouse", lang="en", sense="n")
      ['mate', 'married person', 'better half', 'partner']
      >>> rs.get_antonyms("love", lang="en", sense="v")
      ['detest', 'hate', 'loathe']
      >>> rs.get_hyponyms("marriage", lang="en", sense="n")
      ['cohabitation situation', 'union', 'legal agreement', 'ritual', 'family', 'marital status']
  
  **Note:** The very first time a given relationship is accessed, the full ConceptNet db
  must be parsed and split for fast future access. This can take a couple minutes;
  be patient.
  
  When passing a spaCy ``Token`` or ``Span``, the corresponding ``lang`` and ``sense``
  are inferred automatically from the object::
  
      >>> text = "The quick brown fox jumps over the lazy dog."
      >>> doc = textacy.make_spacy_doc(text, lang="en")
      >>> rs.get_synonyms(doc[1])  # quick
      ['flying', 'fast', 'rapid', 'ready', 'straightaway', 'nimble', 'speedy', 'warm']
      >>> rs.get_synonyms(doc[4:5])  # jumps over
      ['leap', 'startle', 'hump', 'flinch', 'jump off', 'skydive', 'jumpstart', ...]
  
  Many terms won't have entries, for actual linguistic reasons or because the db's
  coverage of a given language's vocabulary isn't comprehensive::
  
      >>> rs.get_meronyms(doc[3])  # fox
      []
      >>> rs.get_antonyms(doc[7])  # lazy
      []
  
  Args:
      data_dir: Path to directory on disk under which resource data is stored,
          i.e. ``/path/to/data_dir/concept_net``.
      version ({"5.7.0", "5.6.0", "5.5.5"}): Version string of the ConceptNet db
          to use. Since newer versions typically represent improvements over earlier
          versions, you'll probably want "5.7.0" (the default value).
class_docstr_tok: ["Interface","to","ConceptNet",",","a","multilingual","knowledge","base","representing","common","words","and","phrases","and","the","common-sense","relationships","between","them",".","Download","the","data","(","one","time","only","!",")",",","and","save","its","contents","to","disk",":",":",">",">",">","import","textacy.resources",">",">",">","rs","=","textacy.resources.ConceptNet","(",")",">",">",">","rs.download","(",")",">",">",">","rs.info","{","'name","'",":","'concept_net","'",",","'site_url","'",":","'http",":","\/\/conceptnet.io","'",",","'publication_url","'",":","'https",":","\/\/arxiv.org\/abs\/1612.03975","'",",","'description","'",":","'An","open",",","multilingual","semantic","network","of","general","knowledge",",","designed","to","help","computers","understand","the","meanings","of","words",".","'","}","Access","other","same-language","terms","related","to","a","given","term","in","a","variety","of","ways",":",":",">",">",">","rs.get_synonyms","(","``","spouse","''",",","lang=","''","en","''",",","sense=","''","n","''",")","[","'mate","'",",","'married","person","'",",","'better","half","'",",","'partner","'","]",">",">",">","rs.get_antonyms","(","``","love","''",",","lang=","''","en","''",",","sense=","''","v","''",")","[","'detest","'",",","'hate","'",",","'loathe","'","]",">",">",">","rs.get_hyponyms","(","``","marriage","''",",","lang=","''","en","''",",","sense=","''","n","''",")","[","'cohabitation","situation","'",",","'union","'",",","'legal","agreement","'",",","'ritual","'",",","'family","'",",","'marital","status","'","]","*","*","Note",":","*","*","The","very","first","time","a","given","relationship","is","accessed",",","the","full","ConceptNet","db","must","be","parsed","and","split","for","fast","future","access",".","This","can","take","a","couple","minutes",";","be","patient",".","When","passing","a","spaCy","``","Token","``","or","``","Span","``",",","the","corresponding","``","lang","``","and","``","sense","``","are","inferred","automatically","from","the","object",":",":",">",">",">","text","=","``","The","quick","brown","fox","jumps","over","the","lazy","dog",".","''",">",">",">","doc","=","textacy.make_spacy_doc","(","text",",","lang=","''","en","''",")",">",">",">","rs.get_synonyms","(","doc","[","1","]",")","#","quick","[","'flying","'",",","'fast","'",",","'rapid","'",",","'ready","'",",","'straightaway","'",",","'nimble","'",",","'speedy","'",",","'warm","'","]",">",">",">","rs.get_synonyms","(","doc","[","4:5","]",")","#","jumps","over","[","'leap","'",",","'startle","'",",","'hump","'",",","'flinch","'",",","'jump","off","'",",","'skydive","'",",","'jumpstart","'",",","...","]","Many","terms","wo","n't","have","entries",",","for","actual","linguistic","reasons","or","because","the","db's","coverage","of","a","given","language","'s","vocabulary","is","n't","comprehensive",":",":",">",">",">","rs.get_meronyms","(","doc","[","3","]",")","#","fox","[","]",">",">",">","rs.get_antonyms","(","doc","[","7","]",")","#","lazy","[","]","Args",":","data_dir",":","Path","to","directory","on","disk","under","which","resource","data","is","stored",",","i.e",".","``","\/path\/to\/data_dir\/concept_net","``",".","version","(","{","``","5.7.0","''",",","``","5.6.0","''",",","``","5.5.5","''","}",")",":","Version","string","of","the","ConceptNet","db","to","use",".","Since","newer","versions","typically","represent","improvements","over","earlier","versions",",","you","'ll","probably","want","``","5.7.0","''","(","the","default","value",")","."]
docstr: Download resource data as a gzipped csv file,
  then save it to disk under the :attr:`ConceptNet.data_dir` directory.
  
  Args:
      force (bool): If True, download resource data, even if it already
          exists on disk; otherwise, don't re-download the data.
docstr_tok: ["Download","resource","data","as","a","gzipped","csv","file",",","then","save","it","to","disk","under","the",":","attr",":","`","ConceptNet.data_dir","`","directory",".","Args",":","force","(","bool",")",":","If","True",",","download","resource","data",",","even","if","it","already","exists","on","disk",";","otherwise",",","do","n't","re-download","the","data","."]
code: def download(self, *, force: bool = False):
      """
      Download resource data as a gzipped csv file,
      then save it to disk under the :attr:`ConceptNet.data_dir` directory.
  
      Args:
          force (bool): If True, download resource data, even if it already
              exists on disk; otherwise, don't re-download the data.
      """
      url = DOWNLOAD_ROOT.format(
          version=self.version, year=self._version_years[self.version]
      )
      tio.download_file(
          url,
          filename=self._filename,
          dirpath=self.data_dir,
          force=force,
      )
  
imports: from __future__ import annotations
  import collections
  import logging
  from typing import ClassVar, Optional
  from spacy.tokens import Span, Token
  from tqdm import tqdm
  from ..None import constants
  from ..None import io
  from ..None import types, utils
  from .base import Resource
label_desc: Use image node_id 2 for calling the ConceptNet obj's underlying member method code with example usage: obj.download() without return types