0

I am currently in the process of writing a research paper about linguistics. I wrote a program in python in order to be able to sift through the data and sort it out in a meaningful way (not statistically just take a bunch of words in a word document and create an excel with all the words in them).

In my methods section, should I include an in depth explanation of the code I used to be able to reorganize the data? how specific should I be in my explanation? Should I include the code I wrote as an appendix?

Thanks for your help:)

8
  • 4
    What do other papers in linguistics do?
    – Bryan Krause
    Jun 3, 2021 at 22:18
  • 3
    How long is your code? Jun 3, 2021 at 22:23
  • 4
    If your program just reads a word document and creates a spreadsheet just say you wrote a program to do that. You can offer to provide the code to anyone who asks. Jun 3, 2021 at 23:55
  • 3
    How much of the novel part of your research depends on new ideas in the code you developed? For example: did you need to solve an unsolved problem in your field to develop your code? Or did you automate a routine task that is not very central to the main point of your work? In the former case you could easily write a paper just about the code and the algorithm behind it, in the latter case it could be a sentence that is mentioned in passing as a detail. The key principle here is that your paper should tell the story of your novel contribution to the field, and not get sidetracked.
    – Andrew
    Jun 4, 2021 at 2:24
  • 2
    This seems like a "content of research" question. Jun 4, 2021 at 8:38

2 Answers 2

4

In the method section, you can describe your code in broad terms to convey the most essential aspects.

In addition, to ensure transparency and reproducibility, you should make your code publicly available. If the code is brief enough, you can publish it in an appendix. If it is longer or scattered around multiple files, you could upload it in a repository (such as Zenodo) and link to it.

(And no, it would not be sufficient to state that the code is available "on request". Often, this is simply not the case a few years after the research project.)

2
  • 2
    I honestly didn't know what Zenodo was until a couple of days ago, and then I noticed it mentioned in quick succession. It seems like a great general idea for all collecting all sorts of research materials. I would say that making a github repo for your implementation has become a standard in computer science (and we deal with a lot of code), as this allows future maintenance and good version control. Fortunately, it seems that Zenodo actually supports linking from github :)
    – penelope
    Jun 4, 2021 at 10:04
  • Interesting! I’ve never heard of Zenado and will definitely look into it. Adding the code in the appendix is a good idea but I believe it’s a bit too long… since the code is such a small part of the paper itself I believe it isn’t needed based on other answers
    – Jonathan
    Jun 11, 2021 at 10:03
1

Actually, as you describe it here, there is nothing very interesting or new about your code. The fact that it is in Python isn't relevant. It is also the sort of thing that you can do with a few lines of unix-like code and the concept has been around since the 60's (at least).

Given that, I think a very brief description is all that is needed. It may seem like magic to someone in linguistics, but it is a standard elementary programming problem.

Use your words on the interesting linguistics relevant things in the paper, not the program.

6
  • Depending on the content of the paper, It could be very relevant how the code works (in detail). Quoting OP, the phrase "just take a bunch of words" is definitely not what you want in the paper. How are words defined? Separated by spaces? dashes? other symbols? Were any words excluded? Why? Was a stemmer used? Should one be used? Do numbers count as words? How are accents and emojis handled? What about spelling-errors or documents that are partly in a different language? If the "data reorganisation" is important for the result, these details could be relevant.
    – Louic
    Jun 4, 2021 at 12:41
  • 1
    @Louic, the unix toolset is designed to handle all of that. I don't see any thing unique here. Especially as described by the OP.
    – Buffy
    Jun 4, 2021 at 12:52
  • 2
    It is relevant which parts of the "unix toolset" were used, and why. Especially if OP reimplemented existing functionality on their own.
    – Louic
    Jun 4, 2021 at 13:05
  • 3
    It's not the (lack of) originality that suggests the code should be published or at least described well, but the (linguitstic) methodological choices implicit in the code and the reproducibility.
    – henning
    Jun 4, 2021 at 13:33
  • 1
    @henning, if I run the same (deterministic) code on the same data then I expect the same results. That would prove nothing. Reproducibility is better served with an independently developed selection process.
    – Buffy
    Jun 4, 2021 at 14:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .