Diff
checker
Text
Text
Bilder
Dokumente
Excel
Ordner
Legal
Enterprise
Desktop-App
Preise
Einloggen
Diffchecker Desktop herunterladen
Texte vergleichen
Finde den Unterschied zwischen zwei Textdateien
Werkzeuge
Verlauf
Live-Editor
Gleiches ausblenden
Zeilenumbruch aus
Ansicht
Zweispaltig
Einspaltig
Vergleichsgenauigkeit
Intelligent
Wort
Zeichen
Syntaxhervorhebung
Syntax auswählen
Ignorieren
Text umwandeln
Zur ersten Änderung
Eingabe bearbeiten
Diffchecker Desktop
Der sicherste Weg, Diffchecker zu nutzen. Hol dir die Desktop-App: Deine Diffs verlassen nie deinen Computer!
Desktop holen
Untitled diff
Erstellt
vor 7 Jahren
Diff läuft nie ab
Löschen
Exportieren
Teilen
Erklären
35 Entfernungen
Zeilen
Gesamt
Entfernt
Zeichen
Gesamt
Entfernt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
60 Zeilen
Kopieren
25 Hinzufügungen
Zeilen
Gesamt
Hinzugefügt
Zeichen
Gesamt
Hinzugefügt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
52 Zeilen
Kopieren
Kopieren
Kopiert
Kopieren
Kopiert
const
algorithmia
= require(
'algorithmia'
)
import
algorithmia
from
'algorithmia'
;
const algorithmiaApiKey = require('../credentials/algorithmia.json').apiKey
const algorithmiaApiKey = require('../credentials/algorithmia.json').apiKey
Kopieren
Kopiert
Kopieren
Kopiert
const
sentenceBoundaryDetection
= require(
'sbd'
)
import
sentenceBoundaryDetection
from
'sbd'
;
import { IContent } from './robots.api';
Kopieren
Kopiert
Kopieren
Kopiert
async function robot(content
) {
async function robot(content
: IContent
) {
await fetchContentFromWikipedia(content)
await fetchContentFromWikipedia(content)
sanitizeContent(content)
sanitizeContent(content)
breakContentIntoSentences(content)
breakContentIntoSentences(content)
Kopieren
Kopiert
Kopieren
Kopiert
async function fetchContentFromWikipedia(content
) {
async function fetchContentFromWikipedia(content
: IContent
) {
const algorithmiaAuthenticated = algorithmia(algorithmiaApiKey)
const algorithmiaAuthenticated = algorithmia(algorithmiaApiKey)
const wikipediaAlgorithm = algorithmiaAuthenticated.algo('web/WikipediaParser/0.1.2')
const wikipediaAlgorithm = algorithmiaAuthenticated.algo('web/WikipediaParser/0.1.2')
const wikipediaResponde = await wikipediaAlgorithm.pipe(content.searchTerm)
const wikipediaResponde = await wikipediaAlgorithm.pipe(content.searchTerm)
Kopieren
Kopiert
Kopieren
Kopiert
const
wikipediaContent
= wikipediaResponde.get()
const
{
wikipediaContent
}
= wikipediaResponde.get()
content.sourceContentOriginal = wikipediaContent
.content
content.sourceContentOriginal = wikipediaContent
}
}
Kopieren
Kopiert
Kopieren
Kopiert
function sanitizeContent(content
) {
function sanitizeContent(content
: IContent
) {
const withoutBlankLinesAndMarkdown = removeBlankLinesAndMarkdown(content.sourceContentOriginal)
const withoutBlankLinesAndMarkdown = removeBlankLinesAndMarkdown(content.sourceContentOriginal)
const withoutDatesInParentheses = removeDatesInParentheses(withoutBlankLinesAndMarkdown)
const withoutDatesInParentheses = removeDatesInParentheses(withoutBlankLinesAndMarkdown)
content.sourceContentSanitized = withoutDatesInParentheses
content.sourceContentSanitized = withoutDatesInParentheses
Kopieren
Kopiert
Kopieren
Kopiert
function removeBlankLinesAndMarkdown(text
)
{
function removeBlankLinesAndMarkdown(text
: string): string
{
const allLines = text.split('\n')
const allLines = text.split('\n')
Kopieren
Kopiert
Kopieren
Kopiert
const
withoutBlankLinesAndMarkdown = allLines.
filter
(
(line
) =>
{
const
filter
Func =
(line
: string
) =>
if
(line.trim().length === 0 || line.trim().startsWith('='))
{
!
(line.trim().length === 0 || line.trim().startsWith('='))
return false
}
return
allLines.filter(filterFunc)
.join(' ')
return true
})
return
withoutBlankLinesAndMarkdown
.join(' ')
}
}
}
}
Kopieren
Kopiert
Kopieren
Kopiert
function removeDatesInParentheses(text
)
{
function removeDatesInParentheses(text
: string): string
{
return text.replace(/\((?:\([^()]*\)|[^()])*\)/gm, '').replace(/ /g,' ')
return text.replace(/\((?:\([^()]*\)|[^()])*\)/gm, '').replace(/ /g,' ')
}
}
Kopieren
Kopiert
Kopieren
Kopiert
function breakContentIntoSentences(content
) {
function breakContentIntoSentences(content
: IC
ontent
) {
c
ontent
.sentences = []
const sentences = sentenceBoundaryDetection.sentences(content.sourceContentSanitized)
const sentences = sentenceBoundaryDetection.sentences(content.sourceContentSanitized)
Kopieren
Kopiert
Kopieren
Kopiert
sentences.forEach((sentence) => {
content.sentences = sentences.map((text: string) => ({
content.sentences.push({
text,
text: sentence,
keywords: [],
keywords: [],
images: []
images: []
})
)
})
}
)
}
}
}
}
module.exports = robot
module.exports = robot
Gespeicherte Diffs
Originaltext
Datei öffnen
const algorithmia = require('algorithmia') const algorithmiaApiKey = require('../credentials/algorithmia.json').apiKey const sentenceBoundaryDetection = require('sbd') async function robot(content) { await fetchContentFromWikipedia(content) sanitizeContent(content) breakContentIntoSentences(content) async function fetchContentFromWikipedia(content) { const algorithmiaAuthenticated = algorithmia(algorithmiaApiKey) const wikipediaAlgorithm = algorithmiaAuthenticated.algo('web/WikipediaParser/0.1.2') const wikipediaResponde = await wikipediaAlgorithm.pipe(content.searchTerm) const wikipediaContent = wikipediaResponde.get() content.sourceContentOriginal = wikipediaContent.content } function sanitizeContent(content) { const withoutBlankLinesAndMarkdown = removeBlankLinesAndMarkdown(content.sourceContentOriginal) const withoutDatesInParentheses = removeDatesInParentheses(withoutBlankLinesAndMarkdown) content.sourceContentSanitized = withoutDatesInParentheses function removeBlankLinesAndMarkdown(text) { const allLines = text.split('\n') const withoutBlankLinesAndMarkdown = allLines.filter((line) => { if (line.trim().length === 0 || line.trim().startsWith('=')) { return false } return true }) return withoutBlankLinesAndMarkdown.join(' ') } } function removeDatesInParentheses(text) { return text.replace(/\((?:\([^()]*\)|[^()])*\)/gm, '').replace(/ /g,' ') } function breakContentIntoSentences(content) { content.sentences = [] const sentences = sentenceBoundaryDetection.sentences(content.sourceContentSanitized) sentences.forEach((sentence) => { content.sentences.push({ text: sentence, keywords: [], images: [] }) }) } } module.exports = robot
Bearbeitung
Datei öffnen
import algorithmia from 'algorithmia'; const algorithmiaApiKey = require('../credentials/algorithmia.json').apiKey import sentenceBoundaryDetection from 'sbd'; import { IContent } from './robots.api'; async function robot(content: IContent) { await fetchContentFromWikipedia(content) sanitizeContent(content) breakContentIntoSentences(content) async function fetchContentFromWikipedia(content: IContent) { const algorithmiaAuthenticated = algorithmia(algorithmiaApiKey) const wikipediaAlgorithm = algorithmiaAuthenticated.algo('web/WikipediaParser/0.1.2') const wikipediaResponde = await wikipediaAlgorithm.pipe(content.searchTerm) const { wikipediaContent } = wikipediaResponde.get() content.sourceContentOriginal = wikipediaContent } function sanitizeContent(content: IContent) { const withoutBlankLinesAndMarkdown = removeBlankLinesAndMarkdown(content.sourceContentOriginal) const withoutDatesInParentheses = removeDatesInParentheses(withoutBlankLinesAndMarkdown) content.sourceContentSanitized = withoutDatesInParentheses function removeBlankLinesAndMarkdown(text: string): string { const allLines = text.split('\n') const filterFunc = (line: string) => !(line.trim().length === 0 || line.trim().startsWith('=')) return allLines.filter(filterFunc).join(' ') } } function removeDatesInParentheses(text: string): string { return text.replace(/\((?:\([^()]*\)|[^()])*\)/gm, '').replace(/ /g,' ') } function breakContentIntoSentences(content: IContent) { const sentences = sentenceBoundaryDetection.sentences(content.sourceContentSanitized) content.sentences = sentences.map((text: string) => ({ text, keywords: [], images: [] })) } } module.exports = robot
Unterschied finden