Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
9
11
request
stringlengths
42
205
command
stringlengths
10
83
input_text
stringlengths
4
127
expected_output
stringlengths
4
94
validation_input
stringlengths
6
73
validation_output
stringlengths
4
63
family
stringclasses
1 value
difficulty
int64
3
3
split
stringclasses
1 value
source
stringclasses
1 value
license
stringclasses
1 value
question_url
stringlengths
73
121
question_title
stringlengths
28
86
question_owner
stringlengths
3
21
answer_owner
stringlengths
3
18
answer_id
int64
148k
39M
question_score
int64
105
2.42k
reviewed
bool
1 class
so-1032023
Replace all occurrences of the whole word 'bar' with 'no bar' in the input text, ensuring that partial matches like 'embarassment' are not affected.
sed 's/\bbar\b/no bar/g'
bar embarassment bar foo bar foobar
no bar embarassment no bar foo no bar foobar
start bar end no bar here barbell
start no bar end no no bar here barbell
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/1032023/sed-whole-word-search-and-replace
sed whole word search and replace
ksuralta
Joakim Lundborg
1,032,039
159
true
so-11145270
Replace the entire third line of the input text with the string 'replacement-line'.
sed '3s/.*/replacement-line/'
Line one Line two Line three Line four
Line one Line two replacement-line Line four
Alpha Beta Gamma Delta Epsilon
Alpha Beta replacement-line Delta Epsilon
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/11145270/how-to-replace-an-entire-line-in-a-text-file-by-line-number
How to replace an entire line in a text file by line number
user788171
chepner
11,145,362
225
true
so-11245144
Replace any line containing the string 'TEXT_TO_BE_REPLACED' with the text 'This line is removed by the admin.'
sed '/TEXT_TO_BE_REPLACED/c\This line is removed by the admin.'
sometext sometext sometext TEXT_TO_BE_REPLACED sometext sometext sometext other line another line with TEXT_TO_BE_REPLACED here
This line is removed by the admin. other line This line is removed by the admin.
line one TEXT_TO_BE_REPLACED line three
line one This line is removed by the admin. line three
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/11245144/replace-whole-line-containing-a-string-using-sed
Replace whole line containing a string using Sed
Rahul
Todd A. Jacobs
11,245,501
472
true
so-11469989
Remove the first 4 characters from each line of input.
sed 's/^....//'
pid: 1234 name: test
1234 : test
code: ABCD id: 9999
: ABCD 9999
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/11469989/how-can-i-strip-first-x-characters-from-string-using-sed
How can I strip first X characters from string using sed?
Kokesh
Arnaud F.
11,470,076
174
true
so-11568859
Extract the first sequence of digits followed by 'G' and more digits from each line, printing only the match.
sed -n 's/^[^0-9]*\([0-9][0-9]*G[0-9][0-9]*\).*/\1/p'
This is 02G05 a test string 20-Jul-2012
02G05
No match here Code 123G456 found 9G1 end
123G456 9G1
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/11568859/how-to-extract-text-from-a-string-using-sed
How to extract text from a string using sed?
RanRag
tripleee
11,568,930
130
true
so-13055889
Replace all commas with a comma surrounded by single quotes in the input text.
sed "s/,/','/g"
A,B,C
A','B','C
X,Y,Z 1,2
X','Y','Z 1','2
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/13055889/sed-with-literal-string-not-input-file
sed with literal string--not input file
amphibient
Gilles Quénot
13,055,913
135
true
so-13242469
Extract the text between the words 'Here' and 'String' on a single line, removing the words themselves.
sed 's/^.*Here\(.*\)String.*$/\1/'
Here is a String
is a
Here we go String now
we go
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/13242469/how-to-use-sed-grep-to-extract-text-between-two-words
How to use sed/grep to extract text between two words?
user1190650
Brian Campbell
13,242,517
228
true
so-1429556
Print only the second line of the input stream.
sed -n '2p'
first line second line third line
second line
alpha beta gamma delta
beta
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/1429556/command-to-get-nth-line-of-stdout
Command to get nth line of STDOUT
Alana Storm
Jonathan Leffler
1,429,628
277
true
so-14671293
Remove all sequences of digits from the input text using a POSIX-compatible character class.
sed 's/[[:digit:]]\+//g'
abc123def456 789xyz
abcdef xyz
no digits here 1a2b3c
no digits here abc
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/14671293/why-doesnt-d-work-in-regular-expressions-in-sed
Why doesn't `\d` work in regular expressions in sed?
user2036880
Kamil
14,671,415
105
true
so-148451
Replace only the first occurrence of the string 'foo' with 'bar' in the input stream.
sed '0,/foo/s//bar/'
foo baz foo qux foo end
bar baz foo qux foo end
no match here foo match here foo another
no match here bar match here foo another
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/148451/how-to-use-sed-to-replace-only-the-first-occurrence-in-a-file
How to use sed to replace only the first occurrence in a file?
David Dibben
Ben Hoffstein
148,473
346
true
so-15559359
Insert the line 'CLIENTSCRIPT2="hello"' after the first line that matches 'CLIENTSCRIPT="foo"'.
sed '/CLIENTSCRIPT="foo"/a\ CLIENTSCRIPT2="hello"'
CLIENTSCRIPT="foo" CLIENTFILE="bar"
CLIENTSCRIPT="foo" CLIENTSCRIPT2="hello" CLIENTFILE="bar"
line1 CLIENTSCRIPT="foo" line3
line1 CLIENTSCRIPT="foo" CLIENTSCRIPT2="hello" line3
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/15559359/insert-line-after-match-using-sed
Insert line after match using sed
user2150250
Gilles Quénot
15,559,399
371
true
so-15849119
Replace all occurrences of the word 'dog' with 'log' in each line of the input.
sed -e 's/dog/log/g'
dog dog dos
log log dos
a dog b dog c
a log b log c
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/15849119/why-does-sed-not-replace-all-occurrences
Why does sed not replace all occurrences?
Nishant George Agrwal
Bruno Reis
15,849,152
188
true
so-16414410
Remove all lines that are empty or contain only whitespace characters from the input text.
sed '/^[[:space:]]*$/d'
xxxxxx yyyyyy zzzzzz
xxxxxx yyyyyy zzzzzz
hello world foo
hello world foo
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/16414410/delete-empty-lines-using-sed
Delete empty lines using sed
jonas
Kent
16,414,489
530
true
so-1665549
Extract the filename from lines matching the pattern '[wrote filename.class]' and suppress all other lines.
sed -n 's/^\[wrote \(.*\.class\)\]$/\1/p'
[wrote some-class-name.class]
some-class-name.class
[wrote Main.class] compiling... [wrote Utils.class]
Main.class Utils.class
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/1665549/have-sed-ignore-non-matching-lines
Have sed ignore non-matching lines
Paggas
liori
1,665,662
138
true
so-1706431
Replace all spaces in the input with underscores.
sed 's/ /_/g'
This is just a test Windows XP
This_is_just_a_test Windows_XP
Hello World Foo Bar My File Name.txt
Hello_World_Foo_Bar My_File_Name.txt
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/1706431/the-easiest-way-to-replace-white-spaces-with-underscores-in-bash
The easiest way to replace white spaces with (underscores) _ in bash
flazzarini
ghostdog74
1,706,459
107
true
so-17511639
Extract and print only the last integer and floating-point number (separated by whitespace) from each line, ignoring preceding text.
sed -n 's/^.*[^0-9]\([0-9][0-9]*\)[ \t]\([0-9][0-9]*\.[0-9][0-9]*\)[ \t]*$/\1 \2/p'
foo bar <foo> bla 1 2 3.4 no match here values 10 20.5
2 3.4 10 20.5
test 5 6.7 abc 123 456.789 nothing
5 6.7 123 456.789
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/17511639/sed-print-only-matching-group
sed: print only matching group
mort
iruvar
17,511,700
205
true
so-18439528
Insert the line ' hello world' (with three leading spaces) before the second line of the input text.
sed '2i\ hello world'
hello world
hello hello world world
line1 line2 line3
line1 hello world line2 line3
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/18439528/sed-insert-line-with-leading-spaces-to-a-specific-line
sed insert line with leading spaces to a specific line
Ggdw
Atropo
18,439,749
120
true
so-20348097
Remove the colon and everything after it from each line of input.
sed 's/:.*//'
/some/random/file.csv:some string /some/random/file2.csv:some string2
/some/random/file.csv /some/random/file2.csv
path/to/data.txt:value here another/path.log:more data
path/to/data.txt another/path.log
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/20348097/bash-extract-string-before-a-colon
bash, extract string before a colon
user788171
ray
20,348,145
111
true
so-2112469
Delete lines 5 through 10 and line 12 from the input text.
sed -e '5,10d;12d'
Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8
Line 1 Line 2 Line 3 Line 4
A B C D E F G H I J K L M
A B C D K M
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/2112469/delete-specific-line-numbers-from-a-text-file-using-sed
Delete specific line number(s) from a text file using sed?
Justin Ethier
Brian Campbell
2,112,496
367
true
so-24509214
Replace the string 'ones' with 'one's' in the input text using sed.
sed "s/ones/one's/g"
ones thing
one's thing
ones and ones again
one's and one's again
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/24509214/how-to-escape-single-quote-in-sed
How to escape single quote in sed?
Thomas Bratt
Kent
24,509,931
148
true
so-2610115
Insert a literal tab character at the beginning of every line in the input.
sed 's/^/ /'
hello world
hello world
foo bar baz
foo bar baz
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/2610115/why-is-sed-not-recognizing-t-as-a-tab
Why is sed not recognizing \t as a tab?
sixtyfootersdude
Mark Byers
2,610,121
132
true
so-26568952
Swap all occurrences of 'ab' with 'bc' and 'bc' with 'ab' simultaneously in the input stream, assuming '~' does not appear in the text.
sed 's/ab/~~/g; s/bc/ab/g; s/~~/bc/g'
abbc
bcab
abc ab bc
bcc bc ab
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/26568952/how-to-swap-text-based-on-patterns-at-once-with-sed
How to swap text based on patterns at once with sed?
DaniloNC
ooga
26,568,996
344
true
so-2777579
Extract only the sequences of digits from each line, separated by a space. If a line has multiple digit sequences, print them all on one line separated by spaces. If no digits, print nothing for that line.
sed -n 's/[^0-9][^0-9]*/ /g; s/^ *//; s/ *$//; /[0-9]/p'
This is a sample 123 text and some 987 numbers no numbers here abc 42 def
123 987 42
start 10 middle 20 end just text 555
10 20 555
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/2777579/how-can-i-output-only-captured-groups-with-sed
How can I output only captured groups with sed?
Pablo
Dennis Williamson
2,778,096
426
true
so-2869669
Append the string 'string after each line' to the end of every line in the input.
sed -e 's/$/string after each line/'
Line one Line two Line three
Line onestring after each line Line twostring after each line Line threestring after each line
Hello World Foo Bar
Hello Worldstring after each line Foo Barstring after each line
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/2869669/in-bash-how-do-i-add-a-string-after-each-line-in-a-file
In Bash, how do I add a string after each line in a file?
Jason Volkoz
Tom DeGisi
2,869,736
170
true
so-3134791
Remove all newline characters from the input text to join all lines into a single continuous string.
sed ':a;N;$!ba;s/\n//g'
22791 ; 14336 ; 22821 ;
22791;14336;22821;
A B C
ABC
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/3134791/how-do-i-remove-newlines-from-a-text-file
How do I remove newlines from a text file?
Alucard
Tyler McHenry
3,134,827
213
true
so-38672680
Join all lines into a single line, replacing newlines with the literal characters backslash and n.
sed ':a;N;$!ba;s/\n/\\n/g'
Line one Line two Line three
Line one\nLine two\nLine three
First Second
First\nSecond
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/38672680/replace-newlines-with-literal-n
Replace newlines with literal \n
Parze
anubhava
38,672,741
106
true
so-38972736
Print all lines from the first occurrence of 'PAT1' to the next occurrence of 'PAT2', inclusive of both pattern lines.
sed -n '/PAT1/,/PAT2/p'
1 2 PAT1 3 4 PAT2 5
PAT1 3 4 PAT2
start PAT1 middle end PAT2 finish
PAT1 middle end PAT2
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/38972736/how-to-print-lines-between-two-patterns-inclusive-or-exclusive-in-sed-awk-or
How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
fedorqui
fedorqui
38,972,737
116
true
so-4569825
Convert all uppercase letters in the input text to lowercase.
sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'
Hello World THIS IS A TEST Mixed Case Text
hello world this is a test mixed case text
ABCdef XYZ123 No Change here
abcdef xyz123 no change here
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/4569825/sed-one-liner-to-convert-all-uppercase-to-lowercase
sed one-liner to convert all uppercase to lowercase?
magnetar
magnetar
4,581,564
213
true
so-5080988
Extract the value inside double quotes that immediately follows name= on each line.
sed -n 's/.*name="\([^"]*\)".*/\1/p'
<table name="content_analyzer" primary-key="id"> <type="global" /> </table>
content_analyzer
<tag name="test_value" attr="val">
test_value
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/5080988/how-to-extract-string-following-a-pattern-with-grep-regex-or-perl
How to extract string following a pattern with grep, regex or perl
wrangler
sidyll
5,081,519
122
true
so-5227295
Delete the line matching 'The second line' and all subsequent lines from the input text.
sed '/The second line/,$d'
The first line The second line The third line The fourth line
The first line
Line A Line B The second line Line C
Line A Line B
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/5227295/how-do-i-delete-all-lines-in-a-file-starting-from-after-a-matching-line
How do I delete all lines in a file starting from after a matching line?
DocWiki
Dennis Williamson
5,227,429
126
true
so-538664
Print only the first 12 characters of each line from the input text.
sed -e 's/^\(.\{12\}\).*/\1/'
Hello World This Is A Test Short This is a longer line that exceeds twelve characters
Hello World Short This is a lo
123456789012345 123456789012 abcdefghijklmnop
123456789012 123456789012 abcdefghijkl
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/538664/using-sed-how-do-you-print-the-first-n-characters-of-a-line
Using sed, how do you print the first &#39;N&#39; characters of a line?
Berlin Brown
Paul Tomblin
538,676
153
true
so-5410757
Delete all lines containing the string 'error' from the input text.
sed '/error/d'
line one error found here line three another error line final line
line one line three final line
no errors here this is clean error in middle clean again
this is clean clean again
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/5410757/how-can-i-delete-all-lines-that-contain-a-specific-string-from-a-text-file
How can I delete all lines that contain a specific string from a text file?
A Clockwork Orange
SiegeX
5,410,784
2,423
true
so-6022384
Print only the 3rd line of the input text.
sed '3q;d'
first line second line third line fourth line fifth line
third line
alpha beta gamma delta
gamma
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/6022384/bash-tool-to-get-nth-line-from-a-file
Bash tool to get nth line from a file
Vlad Vivdovitch
anubhava
6,022,431
914
true
so-6287755
Delete all lines strictly between a line starting with # and a line starting with $, keeping the boundary lines.
sed '/^#/,/^\$/{/^#/!{/^\$/!d}}'
# ID 1 blah blah blah blah $ description 1 blah blah
# ID 1 $ description 1 blah blah
# Start remove this and this $ End keep this
# Start $ End keep this
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/6287755/using-sed-to-delete-all-lines-between-two-matching-patterns
Using sed to delete all lines between two matching patterns
Ken
anubhava
6,287,940
120
true
so-723157
Insert a newline before every occurrence of a phone number pattern like (012)345-6789 in the input text.
sed 's/(\([0-9]\{3\}\))[0-9]\{3\}-[0-9]\{4\}/\n&/g'
some text (012)345-6789
some text (012)345-6789
call (123)456-7890 or (987)654-3210 now
call (123)456-7890 or (987)654-3210 now
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/723157/how-to-insert-a-newline-in-front-of-a-pattern
How to insert a newline in front of a pattern?
Dennis
Dennis
723,247
146
true
so-7451423
Print only the line immediately following any line that contains the string 'blah'. Do not print the matching line itself.
sed -n '/blah/{n;p;}'
header blah found next line content footer
next line content
no match here blah trigger result line another blah second result end
result line second result
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/7451423/how-to-show-only-next-line-after-the-matched-one
How to show only next line after the matched one?
facha
Michał Šrajer
7,451,456
279
true
so-7517632
Replace the literal string "http://www.fubar.com" with URL_FUBAR in the input.
sed 's#"http://www\.fubar\.com"#URL_FUBAR#g'
Visit "http://www.fubar.com" now. Keep "http://other.com".
Visit URL_FUBAR now. Keep "http://other.com".
Link: "http://www.fubar.com"
Link: URL_FUBAR
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/7517632/how-do-i-escape-slashes-and-double-and-single-quotes-in-sed
How do I escape slashes and double and single quotes in sed?
KRB
Kusalananda
7,517,900
122
true
so-8206280
Delete all lines that begin with a hash character (#) from the input text.
sed '/^#/d'
# This is a comment This is code # Another comment More code # inline comment
This is code More code # inline comment
# Comment line 1 Valid line 1 # Comment line 2 Valid line 2 with # symbol
Valid line 1 Valid line 2 with # symbol
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/8206280/delete-all-lines-beginning-with-a-from-a-file
Delete all lines beginning with a # from a file
Village
Raymond Hettinger
8,206,295
283
true
so-8822097
Replace any line starting with 'aaa=' followed by any characters with the line 'aaa=xxx'.
sed 's/^aaa=.*/aaa=xxx/'
aaa=bbb aaa=ccc aaa=ddd other=line
aaa=xxx aaa=xxx aaa=xxx other=line
aaa=test keep=this aaa=value
aaa=xxx keep=this aaa=xxx
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/8822097/how-to-replace-a-whole-line-with-sed
How to replace a whole line with sed?
Michael
John Doyle
8,822,211
253
true
so-9533679
Prepend the text '<added text> ' to the beginning of the first line of the input stream without adding a new line.
sed '1s/^/<added text> /'
some text at the beginning second line
<added text> some text at the beginning second line
hello world
<added text> hello world
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/9533679/how-to-insert-a-text-at-the-beginning-of-a-file
How to insert a text at the beginning of a file?
user219882
kev
9,533,736
350
true
so-9605232
Merge every two consecutive lines into a single line separated by a space.
sed 'N;s/\n/ /'
KEY 4048:1736 string 3 KEY 0:1772 string 1
KEY 4048:1736 string 3 KEY 0:1772 string 1
Line A Line B Line C Line D
Line A Line B Line C Line D
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/9605232/how-to-merge-every-two-lines-into-one-from-the-command-line
How to merge every two lines into one from the command line?
shantanuo
Kent
9,605,559
229
true
so-9953448
Remove every space and tab character from each input line.
sed 's/[[:space:]]//g'
Hello World New Line
HelloWorld NewLine
a b c d
abc d
real-stackoverflow
3
test
stackoverflow-accepted-answer
CC-BY-SA-4.0
https://stackoverflow.com/questions/9953448/how-to-remove-all-white-spaces-from-a-given-text-file
How to remove all white spaces from a given text file?
Lunar Mushrooms
Paulo Scardine
9,953,487
123
true

Sedweave Real Questions

A held-out natural-language-to-sed evaluation set derived from highly voted Stack Overflow questions and accepted answers. It tests whether Sedweave generalizes beyond the phrasing and task distribution of its synthetic training data.

Contents

  • 42 manually reviewed tasks from 42 unique source questions.
  • Two different representative inputs per task, with actual outputs from both.
  • Every task is in the test split; no paraphrases or training rows are included.
  • Zero input-text or request/command overlap with asterbraid/sedweave-data.

Every reference command was executed on both inputs with /usr/bin/sed (GNU sed) 4.9: 84 successful executions, 0 errors. Commands start with sed, read one stream on stdin, and avoid filenames, in-place edits, file commands, pipelines, and shell execution. Some authentic solutions use GNU sed extensions.

Source and attribution

Each row includes question_url, question_title, question_owner, answer_owner, and answer_id. ATTRIBUTION.md lists every source. The request is a self-contained instruction derived from the question and accepted answer; command is an executable solution. Request-to-command intent was manually reviewed in addition to execution verification.

from datasets import load_dataset

ds = load_dataset("asterbraid/sedweave-so-data", split="test")
print(ds[0])

Public model evaluation

Greedy generation with asterbraid/sedweave-0.5b; one prediction per task. Valid means the generated command executes. Correct requires exact expected output on both inputs, with only trailing special tokens removed.

Model Valid Correct
Sedweave 0.5B 71.4% (30/42) 23.8% (10/42)

Full predictions and the summary are included under evaluation/.

Limitations

This is a small, high-vote sample, not a representative benchmark of all sed use. Tasks were selected for compatibility with single-stream input and the safety guard. Exact outputs on two synthetic representative inputs do not prove correctness on every possible input. Some requests or commands may be ambiguous outside their original context.

License

Original Stack Overflow content and these derived rows are CC BY-SA 4.0. See SO_DATASET_LICENSE.txt and ATTRIBUTION.md. Included collection, conversion, review, and validation code is Apache-2.0.

Downloads last month
41

Collection including asterbraid/sedweave-so-data