![]() SetLinkRenderer ( LinkRenderer $linkRenderer) SetHookContainer ( HookContainer $hookContainer) Sets the context this SpecialPage is executed in. SetContentLanguage ( Language $contentLanguage) If the user is not logged in or is a temporary user, throws UserNotLoggedIn. RequireNamedUser ( $reasonMsg='exception-nologin-text', $titleMsg='exception-nologin') If the user is not logged in, throws UserNotLoggedIn error. RequireLogin ( $reasonMsg='exception-nologin-text', $titleMsg='exception-nologin') Return an array of subpages beginning with $search that this special page will accept. PrefixSearchSubpages ( $search, $limit, $offset) Wrapper around wfMessage that sets the current context. How long to cache page when it is being included. Get or set whether this special page is listed in Special:SpecialPages. More.Ĭan be overridden by subclasses with more complicated permissions schemes. Whether it's allowed to transclude the special page via. Is this page expensive (for some definition of expensive)? Expensive pages are disabled or cached in miser mode. Is this page cached? Expensive pages are cached or disabled in miser mode. ![]() Whether the special page is being evaluated via transclusion. Shortcut to get the User executing this instance. Shortcut to get the skin being used for this instance. Similar to getDescription but takes into account sub pages and designed for display in tabs. Get the permission that a user must have to execute this page. Get the WebRequest being used for this instance. Get the OutputPage being used for this instance. Get the localised name of the special page. Get the group that the special page belongs in on Special: SpecialPage Use this method, instead of getGroupName to allow customization of the group name from the wiki side. Returns the name that goes in the \ in the special page itself, and also the name that will be listed in Special:Specialpages. ![]() Gets the context this SpecialPage is executed in. Shortcut to get the Authority executing this instance. Return an array of strings representing page titles that are discoverable to end users via UI. Indicates whether this special page may perform database writes. If the wiki is currently in readonly mode, throws a ReadOnlyError. More.Ĭhecks if userCanExecute, and if not throws a PermissionsError. More.ĪddHelpLink ( $to, $overrideBaseUrl=false)Īdds help link with an icon via page indicators. _construct ( $name='', $restriction='', $ listed= true, $function=false, $file='', $includable=false)ĭefault constructor for special pages Derivative classes should call this from their constructor Note that if the user does not have the required level, an error message will be displayed by the default execute() method, without the global function ever being called. Public Member Functions inherited from SpecialPage Whether this special page is listed in Special:SpecialPages. _construct ( $name, $restriction='', $function=false, $file='default') Public Member Functions inherited from UnlistedSpecialPage Return part of the request string for a special redirect page This allows passing, e.g. Public Member Functions inherited from RedirectSpecialPage # print "StanfordSegmenter succesfuly loaded!"įname = ".txt".Return an array of subpages that this special page will accept. # path_to_dict="./stanford-segmenter-/data/") # path_to_model="./stanford-segmenter-/data/pku.gz", # path_to_sihan_corpora_dict="./stanford-segmenter-/data", # segmenter = StanfordSegmenter(path_to_jar="./stanford-segmenter-/stanford-segmenter-3.6.0.jar", # from _segmenter import StanfordSegmenter Feel free to adjust it according to your computing power.')įrom konlpy. add_argument( '-max_corpus_size', type = int, default = 1000000000, help = 'the maximum size of the corpus. add_argument( '-lcode', help = 'ISO 639-1 code of target language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |