Atom.rpg.trudograd.v1.051.torrent
# Example usage filename = "ATOM.RPG.Trudograd.v1.051.torrent" features = extract_features(filename) for feature, value in features.items(): print(f"{feature}: {value}") This example extracts various features from the given filename. The features can be adjusted based on the requirements of your application or analysis.
def extract_features(filename: str) -> Dict[str, str]: features = {} # Filename features features['full_filename'] = filename features['filename_without_extension'] = filename.rsplit('.', 1)[0] features['file_extension'] = '.' + filename.rsplit('.', 1)[1] if '.' in filename else '' # Game information features match = re.search(r'([A-Za-z\s\.]+)(v\d+\.\d+)(\.torrent)', filename) if match: features['game_title'] = match.group(1).strip() features['version_number'] = match.group(2).lstrip('v') else: features['game_title'] = '' features['version_number'] = '' # Categorical features features['genre'] = 'RPG' # Assumption features['platform'] = 'PC' # Assumption # Text-based features features['word_count'] = len(filename.split('.')) features['special_characters_count'] = sum(not c.isalnum() for c in filename) return features ATOM.RPG.Trudograd.v1.051.torrent