Türkçe metinleri doğru bir şekilde tamamı küçük harf (lowercase), tamamı büyük harf (uppercase) ve sözcüklerin ilk harflerinin büyük olduğu (title case) biçimlerine dönüştürmeye yarayan Python sınıfı. Bu sınıf Python'un büyük İ ve küçük ı konusunda yaşadığı beceriksizliği göz önüne alır. Ayrıca, metni başlık biçimine çevirirken "ve"nin küçük harfle başlamasına, tireden sonra gelen harfin de büyük harf olmasına özen gösterir (Kuruluş isimlerini dönüştürürken önemli).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is "unmunching" script for Hunspell dictionaries, based on Spylls (full Python port of Hunspell): | |
# https://github.com/zverok/spylls | |
# | |
# "Unmunching" (Hunspell's term) is a process of turning affix-compressed dictionary into plain list | |
# of all language's words. E.g. for English, in the dictionary we have "spell/JSMDRZG" (stem + flags | |
# declaring what suffixes and prefixes it might have), and we can run this script: | |
# | |
# python unmunch.py path/to/en_US spell | |
# | |
# Which will produce this list: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using Hunspell; | |
namespace ConsoleApplication5 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function unxor { | |
param ( | |
[string]$text | |
) | |
$enc = [System.Text.Encoding]::BigEndianUnicode | |
$key = $enc.GetBytes("ş") | |
$bytes = $enc.GetBytes($text) | |
$cycle = 0 | |
for ($i = 0; $i -lt $bytes.Length; $i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import sys | |
import zlib | |
from struct import unpack | |
OFFSET = 0x6B4 | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/anezih/StarDictNet/blob/main/StarDictNet/DictZip.cs | |
# https://framagit.org/tuxor1337/dictzip.js/-/blob/main/dictzip_sync.js | |
import os | |
import zlib | |
from dataclasses import dataclass | |
from struct import unpack | |
class SUBFIELD: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
from zemberek.morphology import TurkishMorphology | |
from zemberek.morphology.lexicon import RootLexicon | |
from zemberek.morphology.morphotactics.turkish_morphotactics import get_morpheme_map | |
MORPHOLOGY = TurkishMorphology.create_with_defaults() | |
def generate_noun(word, morphology): | |
morpheme_map = get_morpheme_map() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net7.0</TargetFramework> | |
<Version>1.4.0</Version> | |
</PropertyGroup> | |
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' "> | |
<PackageReference Include="WeCantSpell.Hunspell" Version="4.0.0" /> | |
</ItemGroup> |