PHP 클래스 TextAnalysis\Downloaders\NltkCorporaIndexDownloader

저자: dcardin
파일 보기 프로젝트 열기: yooper/php-text-analysis 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$packages TextAnalysis\Utilities\Nltk\Download\Package[]
$url The url to the index.xml file
$useCache boolean

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
getCacheFileName ( ) : string
getUseCache ( ) : boolean Get the useCache value

메소드 상세

__construct() 공개 메소드

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 getCacheFileName ( ) : string
리턴 string

getPackages() 공개 메소드

Returns an array of packages available for download from the nltk project
public getPackages ( ) : array
리턴 array

getUrl() 공개 메소드

Returns the URL that file_get_contents is run against
public getUrl ( ) : string
리턴 string

getUseCache() 보호된 메소드

Get the useCache value
protected getUseCache ( ) : boolean
리턴 boolean

getXmlContent() 공개 메소드

Uses file_get_contents to pull down the content from the url
public getXmlContent ( ) : SimpleXMLElement
리턴 SimpleXMLElement

프로퍼티 상세

$packages 보호되어 있는 프로퍼티

protected Package[],TextAnalysis\Utilities\Nltk\Download $packages
리턴 TextAnalysis\Utilities\Nltk\Download\Package[]

$url 보호되어 있는 프로퍼티

The url to the index.xml file
protected $url

$useCache 보호되어 있는 프로퍼티

protected bool $useCache
리턴 boolean