transform

package
v0.0.0-...-50c32d2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package transform 은 데이터 타입은 변환하는 함수들이 정의 되어 있습니다.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractArxivIDFromURL

func ExtractArxivIDFromURL(url string) (string, error)

ExtractArxivIDFromURL extracts ArxivID from the URL.

For example, https://arxiv.org/abs/2102.03732 => 2102.03732

func ExtractPRID

func ExtractPRID(title string) (int32, error)

ExtractPRID extracts PR ID from the title.

For example,

PR-274: On mutual information maximization for representation learning => 274.

func ExtractPaperIDs

func ExtractPaperIDs(title string) ([]string, error)

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

func ExtractYouTubeID(link string) (string, error)

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 Methods

func Methods(methods []models.Method) []*pr12er.Method

Methods paperswithcode 메소드를 pr12er 메소드로 변경.

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

Jump to

Keyboard shortcuts

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