PHP Class TextAnalysis\Downloaders\NltkCorporaIndexDownloader

Author: dcardin
Afficher le fichier Open project: yooper/php-text-analysis Class Usage Examples

Protected Properties

Свойство Type Description
$packages TextAnalysis\Utilities\Nltk\Download\Package[]
$url The url to the index.xml file
$useCache boolean

Méthodes publiques

Méthode Description
__construct ( string $url = 'https://raw.githubusercontent.com/yooper/pta_data/gh-pages/index.xml', boolean $useCache = false )
getPackages ( ) : array Returns an array of packages available for download from the nltk project
getUrl ( ) : string Returns the URL that file_get_contents is run against
getXmlContent ( ) : SimpleXMLElement Uses file_get_contents to pull down the content from the url

Méthodes protégées

Méthode Description
getCacheFileName ( ) : string
getUseCache ( ) : boolean Get the useCache value

Method Details

__construct() public méthode

public __construct ( string $url = 'https://raw.githubusercontent.com/yooper/pta_data/gh-pages/index.xml', boolean $useCache = false )
$url string Default value is provided, but you can override
$useCache boolean use the cached copy if it is available, by default it is off

getCacheFileName() protected méthode

protected getCacheFileName ( ) : string
Résultat string

getPackages() public méthode

Returns an array of packages available for download from the nltk project
public getPackages ( ) : array
Résultat array

getUrl() public méthode

Returns the URL that file_get_contents is run against
public getUrl ( ) : string
Résultat string

getUseCache() protected méthode

Get the useCache value
protected getUseCache ( ) : boolean
Résultat boolean

getXmlContent() public méthode

Uses file_get_contents to pull down the content from the url
public getXmlContent ( ) : SimpleXMLElement
Résultat SimpleXMLElement

Property Details

$packages protected_oe property

protected Package[],TextAnalysis\Utilities\Nltk\Download $packages
Résultat TextAnalysis\Utilities\Nltk\Download\Package[]

$url protected_oe property

The url to the index.xml file
protected $url

$useCache protected_oe property

protected bool $useCache
Résultat boolean