conala-dataset-0.1.0.0: bindings to the CoNaLa dataset
Safe HaskellNone
LanguageHaskell2010

CoNaLa

Contents

Description

Haskell bindings for the CoNaLa dataset [1], Code/Natural Language Challenge

This challenge was designed to test systems for generating program snippets from natural language. For example, if the input is sort list x in reverse order, then the system would be required to output x.sort(reverse=True) in Python.

References

  1. https://conala-corpus.github.io/
Synopsis

Documentation

sourceDataset Source #

Arguments

:: MonadResource m 
=> FilePath

path of dataset file

-> ConduitT a (Either ParserError Item) m () 

Stream the dataset from file

As of May 2022 the dataset can be downloaded from http://www.phontron.com/download/conala-corpus-v1.1.zip

Types

data Item Source #

Dataset item

Constructors

Item 

Fields

  • intent :: Text

    Natural Language intent (i.e., the title of a Stack Overflow question)

  • rewritten_intent :: Text

    Crowdsourced revised intents that try to better reflect the full meaning of the code, typically done by incorporating variable names and function arguments that appeared in the code into the intent. This is the input to be used by systems in the CoNaLa challenge.

  • snippet :: Text

    Python code snippet that implements the intent. This is the output of systems in the challenge.

  • question_id :: QId

    Id of the Stack Overflow question

Instances

Instances details
Eq Item Source # 
Instance details

Defined in CoNaLa

Methods

(==) :: Item -> Item -> Bool #

(/=) :: Item -> Item -> Bool #

Show Item Source # 
Instance details

Defined in CoNaLa

Methods

showsPrec :: Int -> Item -> ShowS #

show :: Item -> String #

showList :: [Item] -> ShowS #

Generic Item Source # 
Instance details

Defined in CoNaLa

Associated Types

type Rep Item :: Type -> Type #

Methods

from :: Item -> Rep Item x #

to :: Rep Item x -> Item #

ToJSON Item Source # 
Instance details

Defined in CoNaLa

FromJSON Item Source # 
Instance details

Defined in CoNaLa

type Rep Item Source # 
Instance details

Defined in CoNaLa

type Rep Item = D1 ('MetaData "Item" "CoNaLa" "conala-dataset-0.1.0.0-5eM3B9rYLe0CvNxFcD0hxy" 'False) (C1 ('MetaCons "Item" 'PrefixI 'True) ((S1 ('MetaSel ('Just "intent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "rewritten_intent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "snippet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "question_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QId))))

newtype QId Source #

Stack Overflow Question ID

Constructors

QId Int 

Instances

Instances details
Eq QId Source # 
Instance details

Defined in CoNaLa

Methods

(==) :: QId -> QId -> Bool #

(/=) :: QId -> QId -> Bool #

Show QId Source # 
Instance details

Defined in CoNaLa

Methods

showsPrec :: Int -> QId -> ShowS #

show :: QId -> String #

showList :: [QId] -> ShowS #

Generic QId Source # 
Instance details

Defined in CoNaLa

Associated Types

type Rep QId :: Type -> Type #

Methods

from :: QId -> Rep QId x #

to :: Rep QId x -> QId #

ToJSON QId Source # 
Instance details

Defined in CoNaLa

FromJSON QId Source # 
Instance details

Defined in CoNaLa

type Rep QId Source # 
Instance details

Defined in CoNaLa

type Rep QId = D1 ('MetaData "QId" "CoNaLa" "conala-dataset-0.1.0.0-5eM3B9rYLe0CvNxFcD0hxy" 'True) (C1 ('MetaCons "QId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))