re2go

package
v0.0.0-...-92284fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Code generated by re2c 3.1, DO NOT EDIT.

Code generated by re2c 3.1, DO NOT EDIT.

Code generated by re2c 3.1, DO NOT EDIT.

Code generated by re2c 3.1, DO NOT EDIT.

Code generated by re2c 3.1, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountCommas

func CountCommas(input string) int

Commas as used in Latin, Sindhi, Chinese and various other scripts. see: https://en.wikipedia.org/wiki/Comma#Comma_variants Original pattern: \u002C|\u060C|\uFE50|\uFE10|\uFE11|\u2E41|\u2E34|\u2E32|\uFF0C

func IsByline

func IsByline(input string) bool

Original pattern: (?i)byline|author|dateline|writtenby|p-author

func IsNegativeClass

func IsNegativeClass(input string) bool

For IsNegativeClass, its original pattern is like this: (?i)-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget

Unfortunately, re2go doesn't handle anchor like ^ and $ internally, so for convenience I'll split that pattern into two: - `^hid$| hid$| hid |^hid ` - `-ad-|hidden|banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget`

func IsPositiveClass

func IsPositiveClass(input string) bool

Original pattern: (?i)article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story

func IsUnlikelyCandidates

func IsUnlikelyCandidates(input string) bool

Original pattern: (?i)-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote

func MaybeItsACandidate

func MaybeItsACandidate(input string) bool

Original pattern: (?i)and|article|body|column|content|main|shadow

func NormalizeSpaces

func NormalizeSpaces(input string) string

Original pattern: (?i)\s{2,}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL