<commit_before>/**
 * 
 */
package org.corpus_tools.atomic.api.editors;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.corpus_tools.atomic.tagset.Tagset;
import org.corpus_tools.atomic.tagset.impl.TagsetFactory;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.common.util.URI;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;

/**
 * // TODO Add description
 *
 * @author <NAME> <[<EMAIL>](mailto:<EMAIL>)>
 * 
 */
public interface TagsetAwareEditor extends IEditorPart {

	static final Logger log = LogManager.getLogger(TagsetAwareEditor.class);

	default public Tagset loadTagset(IEditorInput input) {<commit_msg>Add interface for tagset-aware editors<commit_after>/**
 * 
 */
package org.corpus_tools.atomic.api.editors;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.corpus_tools.atomic.tagset.Tagset;
import org.corpus_tools.atomic.tagset.impl.TagsetFactory;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.common.util.URI;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;

/**
 * // TODO Add description
 * FIXME Add note to not implement this but extend *WithTagsetSupportEditor
 * instead, create new class DocumentGraphEditorWithTagset, include
 * logic from e.g. GridEditor init there, and let editors (ridEditor)
 * extend that
 *
 * @author <NAME> <[<EMAIL>](mailto:<EMAIL>)>
 * 
 */
public interface TagsetAwareEditor extends IEditorPart {

	static final Logger log = LogManager.getLogger(TagsetAwareEditor.class);

	default public Tagset loadTagset(IEditorInput input) {
{'fraction_non_alphanumeric': 0.11608695652173913, 'fraction_numerical': 0.0017391304347826088, 'mean_word_length': 5.391666666666667, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '146119', 'n_tokens_mistral': 746, 'n_tokens_neox': 738, 'n_words': 148}