Add all postags and lemmas to morphofeat attribute.
@param kaf the NAF document
481404
public final void getAllTagsLemmasToNAF(final KAFDocument kaf) {
    final List<List<WF>> sentences = kaf.getSentences();
    for (final List<WF> wfs : sentences) {

      final List<ixa.kaflib.Span<WF>> tokenSpans = new ArrayList<ixa.kaflib.Span<WF>>();
      final String[] tokens = new String[wfs.size()];
      for (int i = 0; i < wfs.size(); i++) {
        tokens[i] = wfs.get(i).getForm();
        final List<WF> wfTarget = new ArrayList<WF>();
        wfTarget.add(wfs.get(i));
        tokenSpans.add(KAFDocument.newWFSpan(wfTarget));
      }
      
      String[][] allPosTags = this.posTagger.getAllPosTags(tokens);
      ListMultimap<String, String> morphMap = lemmatizer.getMultipleLemmas(tokens, allPosTags);
      
      for (int i = 0; i < tokens.length; i++) {
        final Term term = kaf.newTerm(tokenSpans.get(i));
        List<String> posLemmaValues = morphMap.get(tokens[i]);
        if (this.dictLemmatizer != null) {
          dictLemmatizer.getAllPosLemmas(tokens[i], posLemmaValues);
        }
        String allPosLemmasSet = StringUtils.getSetStringFromList(posLemmaValues);
        final String posId = Resources.getKafTagSet(allPosTags[0][i], lang);
        final String type = Resources.setTermType(posId);
        term.setType(type);
        term.setLemma(posLemmaValues.get(0).split("#")[1]);
        term.setPos(posId);
        term.setMorphofeat(allPosLemmasSet);
      }
    }
  }
868969
static void save(KAFDocument kaf, String filename) {
	try {
	    File file = new File(filename);
	    Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF8"));
	    out.write(kafToStr(kaf));
	    out.flush();
	} catch (Exception e) {
	    System.out.println("Error writing to file");
	}
    }
251777
public void addModifier(String modifier) {
		if (!Strings.isEmpty(modifier)) {
			this.sarlArtifact.getModifiers().add(modifier);
		}
	}
313053
protected void addContainerTags() {
	// Only add root if we aren't it
	final RootContainer rc = getRootContainer(container);
	if (rc != null) {
	    tags.add(rc);
	}

	final TreeDepth parentDepth = getTreeDepth(container);
	tags.add(parentDepth != null ? parentDepth.increment() : TreeDepth.ROOT);
    }
704025
def to_naf(self):
        
        if self.type == 'KAF':
            ##convert all the properties
            for node in self.node.findall('properties/property'):
                node.set('id',node.get('pid'))
                del node.attrib['pid']
118977
private void addMixInAnnotations( Map<Class, Class> mapMixInAnnotations, JsonMixIns mapperMixIns ) {
        if ( null != mapperMixIns ) {
            for ( JsonMixIn jsonMixIn : mapperMixIns.value() ) {
                JClassType targetType = findClassType( jsonMixIn.target() );
                if ( null == targetType ) {
                    continue;
                }
                specificTypes.add( targetType );
                specificTypes.addAll( Arrays.asList( targetType.getSubtypes() ) );

                mapMixInAnnotations.put( jsonMixIn.target(), jsonMixIn.mixIn() );
            }
        }

        if ( !mapMixInAnnotations.isEmpty() ) {
            for ( Entry<Class, Class> entry : mapMixInAnnotations.entrySet() ) {
                JClassType targetType = findClassType( entry.getKey() );
                if ( null == targetType ) {
                    continue;
                }

                JClassType mixInType = findClassType( entry.getValue() );
                if ( null == mixInType ) {
                    continue;
                }

                mixInAnnotations.put( targetType.getQualifiedSourceName(), mixInType );
            }
        }
    }
1145506
private void addAdjacentSiblingElements() {
		for (Node node : nodes) {
			Node n = helper.getNextSibling(node);
			if (n != null)
				if (matchTag(n))
					result.add(n);
		}
	}
741333
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraph(List<StyledSegment<SEG, S>> styledSegments, PS paragraphStyle) {
        return addPar(new Paragraph<>(argumentOrDefault(paragraphStyle), segmentOps, styledSegments));
    }
47826
public void setLemmaString(String lemmaString) {
    if (!StringTools.isEmpty(lemmaString)) {
      lemma = lemmaString;
      staticLemma = true;
      postagRegexp = true;
      if (posTag != null) {
        pPosRegexMatch = Pattern.compile(posTag);
      }
    }
  }
764830
public void setFlags(TapRequestFlag f) {
    if (!flagList.contains(f)) {
      if (!hasFlags) {
        hasFlags = true;
        extralength += 4;
        totalbody += 4;
      }
      if (f.equals(TapRequestFlag.BACKFILL)) {
        hasBackfill = true;
        totalbody += 8;
      }
      if (f.equals(TapRequestFlag.LIST_VBUCKETS)
        || f.equals(TapRequestFlag.TAKEOVER_VBUCKETS)) {
        hasVBucketList = true;
        totalbody += 2;
      }
      if (f.equals(TapRequestFlag.CHECKPOINT)) {
        hasVBucketCheckpoints = true;
        totalbody += 2;
      }
      flagList.add(f);
    }
  }
1126846
public void addAll(Map<K, V> m) {
    if (m instanceof CollectionValuedMap<?, ?>) {
      throw new UnsupportedOperationException();
    }
    for (Map.Entry<K, V> e : m.entrySet()) {
      add(e.getKey(), e.getValue());
    }
  }
540228
public void addStep(Diagram diagram) {
		if (diagram.getFigureCount() != figures.size()) {
			throw new RuntimeException("Mismatched diagrams, missing ids");
		}
		for (int i=0;i<diagram.getFigureCount();i++) {
			Figure figure = diagram.getFigure(i);
			String id = figure.getData().getMetaData();
			
			for (int j=0;j<figures.size();j++) {
				Figure existing = (Figure) figures.get(j);
				if (existing.getData().getMetaData().equals(id)) {
					MorphShape morph = (MorphShape) existing.getShape();
					morph.addShape(figure.getShape());
					break;
				}
			}
		}
	}
1266043
def to_kaf(self):
        
        if self.type == 'NAF':
            for node_coref in self.__get_corefs_nodes():
                node_coref.set('coid',node_coref.get('id'))
                del node_coref.attrib['id']
793080
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraph(SEG segment, S style) {
        return addParagraph(segment, style, null);
    }
958143
private static void appendModifierKeyword(final StringBuilder buf, final String modifierKeyword) {
        if (buf.length() > 0 && buf.charAt(buf.length() - 1) != ' ') {
            buf.append(' ');
        }
        buf.append(modifierKeyword);
    }
1181069
void init(KProcess process) {
		process.markings = new Object[this.elements.size()];
		for (KElement element : this.elements) {
			element.init(process);
		}
	}
90143
protected void addWhoData (StringBuilder buf)
    {
        buf.append(getOid());
        if (status != OccupantInfo.ACTIVE) {
            buf.append(" ").append(getStatusTranslation());
        }
    }