Automatic coding in documents

You can autocode document, memos and externals based on paragraphs or paragraph styles. If you are working with structured documents (like interviews that ask the same set of questions) then autocoding can help you to organize the material into codes for further exploration.

Understand automatic coding in document files

You can autocode based on:

  • Paragraph styles  If you have applied paragraph styles in your documents you can use them to automatically code the content. You can apply paragraph styles in Word before you import the file, or you can apply them in NVivo.

    For example—if you have a collection of question/answer interview documents, you could autocode to create a code for each question (based on heading 1 [H1] and heading 2 [H2] styles) and code all respondent answers at the codes.

    Interviews auto coded by question based on heading styles.

  • Paragraphs  You can autocode 'by paragraph'  if one or more documents are tightly structured—for example, paragraph 1 in each document is about fossil fuel and paragraph 2 is about government policy. NVivo makes a code for each paragraph and uses the paragraph number as the code name. You can rename the codes as required.

    Interviews auto coded by paragraph.

  • Speaker  If a document has multiple 'speakers' (for example, the participants in a focus group) you can automatically create a case for each speaker and code the content at the case. This means you can open a case to see everything a particular participant said. You can also assign attribute values to the cases and use them to make comparisons - What do women say? How does it compare to what men say?

Interview transcript auto coded by speaker.

  • Existing coding patterns  You can also code using existing coding patterns.
  • For example, if you have already coded some files to the codes Water quality and Habitat, then you can automatically code additional content containing similarly worded text passages to the codes Water quality and Habitat.
  • Themes or sentiment  Identify themes or sentiment in documents, and code the results to theme or sentiment codes. Automated insights . (This feature is only available in NVivo installations with coding enhancements enabled.)

Autocode documents based on paragraphs or styles

  1. In List View, select the documents you want to autocode.
  2. On the Home tab, in the Coding group, click Autocode.
  3. Follow the steps on the Autocode Wizard.

Wizard step

Description

Step 1

Click Use the file style or structure.

Step 2

  • Click Paragraph to make a numbered code for each paragraph.
  • Click Paragraph styles to use consistent paragraph styles to autocode
    1. From the Available paragraph styles list, select the styles you want to use for coding.
    2. Click the right arrow button >> to add the styles to the Selected paragraph styles list.

      A code is automatically created for each paragraph that is formatted in the selected style, and the text under the style is autocoded to the code. The order of the styles in the list determines how they are nested in the code hierarchy—the first style is the parent of the second and so on.

Step 3

Select where you want to store the newly created codes.

  • Existing Code to store the created codes under an existing parent code—click Select and choose the parent code.
  • New Code to store the created codes under a new parent code—in the Name field enter a name for the new parent code. Click Select to choose a different location for the new parent code.
  • Existing Folder to store the created codes in an existing folder—click Select and choose the existing folder.
  • New Folder to store the created codes in a new folder—in the Name field, enter a name for the new folder. Click Select to choose a different location for the new folder.

(Optional) Select the Aggregate coding from child codes check box, if you want the content coded to child codes to be shown in the parent code.

 

NOTE

  • If a heading contains reserved characters such as   ( \ / : * ? " < > |   they are replaced by a tilde symbol (~) in the newly created code name.
  • To indicate that autocoding is successful, a confirmation message is briefly displayed in the NVivo status bar.
  • You can edit the code names in the Code Properties—select the code in List View, then on the Home tab, in the Item group, click Properties.

Autocode documents based on speaker

If a document contains comments from multiple speakers, you can automatically create a case for each speaker and code the comments at the case. You can then define the demographic attributes for each case and use them to make comparisons - for example, do men and women have different views about community? Organize demographic data

  1. In List View, select the documents you want to autocode.
  2. On the Home tab, in the Coding group, click Autocode.
  3. Follow the steps on the Autocode Wizard.

Wizard step

Description

Step 1

Click Speaker name.

Step 2

  • Enter the name of each speaker as identified in the selected documents. NVivo checks the start of each line (in the selected documents) to confirm that the speaker exists.
  • Choose a document from the preview list, to see the speakers highlighted.

Step 3

  • Choose whether you want to create a new classification for the cases that will be created, or whether you want to add the cases to an existing classification. If you choose to create a new classification, enter a classification name.
  • Select where you want to store the newly created cases.

Once the cases are created, you can assign demographic attributes. Classify cases

NOTE

When autocoding by speaker, follow these guidelines for formatting the transcript:

  • The speaker name must appear at the start of a line. It cannot be proceeded by any characters—including tabs and spaces.
  • The speaker name can appear on the same line with the response or on a separate line above the response—as long as it is at the start of a line.
  • The transcript can be formatted as a table with the speaker name in the left column and the response in the right.
  • Each speaker must be identified by a unique name. NVivo creates a case for each unique speaker name and codes all content by that speaker at the case.

Autocode documents based on existing coding patterns

(This feature is only available in NVivo installations with coding enhancements enabled.)

Pattern-based autocoding is an experimental feature that you can test and try out. This feature is designed to speed up the coding process for large volumes of textual content.

When you autocode using existing patterns, NVivo compares each text passage—for example, sentence or paragraph—to the content already coded to existing codes. If the content of the text passage is similar in wording to content already coded to a code, then the text passage will be coded to that code.

You can also use pattern-based autocoding in conjunction with the other automatic coding techniques. For example, you could autocode your structured interview documents to create codes for the responses to each question. Then, you could use pattern-based coding to 'code on' from a question code.

Pattern-based autocoding is an experimental feature that may work better for some projects than others. Automatic coding using existing coding patterns