Documentation ¶
Overview ¶
Package transform 은 데이터 타입은 변환하는 함수들이 정의 되어 있습니다.
Index ¶
- func ExtractArxivIDFromURL(url string) (string, error)
- func ExtractPRID(title string) (int32, error)
- func ExtractPaperIDs(title string) ([]string, error)
- func ExtractPaperIDsViaProgrammableSearch(title, cx, apiKey string, limiter *rate.Limiter) ([]string, error)
- func ExtractYouTubeID(link string) (string, error)
- func Methods(methods []models.Method) []*pr12er.Method
- func Repositories(repositories []models.Repository) []*pr12er.Repository
- type InvalidYouTubeLinkError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractArxivIDFromURL ¶
ExtractArxivIDFromURL extracts ArxivID from the URL.
For example, https://arxiv.org/abs/2102.03732 => 2102.03732
func ExtractPRID ¶
ExtractPRID extracts PR ID from the title.
For example,
PR-274: On mutual information maximization for representation learning => 274.
func ExtractPaperIDs ¶
ExtractPaperIDs Google Search with the title and gets ArxivIDs.
For example, "PR-274: On mutual information maximization for representation learning" => []string{"1907.13625", "2103.04537", "1910.08350"}.
func ExtractPaperIDsViaProgrammableSearch ¶
func ExtractPaperIDsViaProgrammableSearch(title, cx, apiKey string, limiter *rate.Limiter) ([]string, error)
ExtractPaperIDsViaProgrammableSearch returns ArxivIDs from Programmable Search API.
func ExtractYouTubeID ¶
ExtractYouTubeID extracts videoID from YouTube link
For example,
https://www.youtube.com/watch?v=rtuJqQDWmIA => rtuJqQDWmIA https://youtube.com/watch?v=rtuJqQDWmIA => rtuJqQDWmIA https://youtu.be/rtuJqQDWmIA => rtuJqQDWmIA
func Repositories ¶
func Repositories(repositories []models.Repository) []*pr12er.Repository
Repositories paperswithcode Repository 모델을 pr12er 에 맞는 모델로 변환.
Types ¶
type InvalidYouTubeLinkError ¶
type InvalidYouTubeLinkError struct {
// contains filtered or unexported fields
}
func (InvalidYouTubeLinkError) Error ¶
func (e InvalidYouTubeLinkError) Error() string