From e4e3e8b3a092c978ef864c44b9d4c54d270f8bbf Mon Sep 17 00:00:00 2001 From: Dhruvil Mistry Date: Sat, 27 Jun 2026 14:00:07 +0530 Subject: [PATCH] Fix minor typos in comments and documentation --- .../pipeline/candidate/ads/CountNumOrganicItems.scala | 2 +- .../core/feature/featuremap/FeatureMapSerializer.scala | 2 +- .../search/common/util/ml/prediction_engine/ModelLoader.java | 2 +- .../search/earlybird/partition/SimpleStreamIndexer.java | 2 +- .../earlybird/queryparser/HighFrequencyTermPairExtractor.java | 2 +- .../util/logging/AlertableExceptionLoggingFilter.scala | 2 +- .../src/thrift/com/twitter/tweetypie/tweet_service.thrift | 2 +- .../tweetypie/serverutil/logcachewrites/TweetCacheWrite.scala | 2 +- twml/twml/argument_parser.py | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/product-mixer/component-library/src/main/scala/com/twitter/product_mixer/component_library/pipeline/candidate/ads/CountNumOrganicItems.scala b/product-mixer/component-library/src/main/scala/com/twitter/product_mixer/component_library/pipeline/candidate/ads/CountNumOrganicItems.scala index c42abfa7b7..bc11753dfb 100644 --- a/product-mixer/component-library/src/main/scala/com/twitter/product_mixer/component_library/pipeline/candidate/ads/CountNumOrganicItems.scala +++ b/product-mixer/component-library/src/main/scala/com/twitter/product_mixer/component_library/pipeline/candidate/ads/CountNumOrganicItems.scala @@ -20,7 +20,7 @@ trait EstimateNumOrganicItems[Query <: PipelineQuery with AdsQuery] { * @note the key difference between [[CountNumOrganicItems]] and [[EstimateNumOrganicItems]] is * that for [[EstimateNumOrganicItems]] we don't have any candidates returned yet, so we can * only guess as to the number of organic items in the result set. In contrast, - * [[CountNumOrganicItems]] is used on dependant candidate pipelines where we can scan over + * [[CountNumOrganicItems]] is used on dependent candidate pipelines where we can scan over * the candidate pipelines result set to count the number of organic items. */ trait CountNumOrganicItems[-Query <: PipelineQuery with AdsQuery] { diff --git a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap/FeatureMapSerializer.scala b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap/FeatureMapSerializer.scala index 746f178fb1..92006ccb76 100644 --- a/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap/FeatureMapSerializer.scala +++ b/product-mixer/core/src/main/scala/com/twitter/product_mixer/core/feature/featuremap/FeatureMapSerializer.scala @@ -55,7 +55,7 @@ private[featuremap] class FeatureMapSerializer() extends JsonSerializer[FeatureM gen.writeEndObject() } - // Some features can be very large when stringified, for example when a dependant candidate + // Some features can be very large when stringified, for example when a dependent candidate // pipeline is used, the entire previous candidate pipeline result is serialized into a feature. // This causes significant performance issues when the result is later sent over the wire. private def truncateString(input: String): String = diff --git a/src/java/com/twitter/search/common/util/ml/prediction_engine/ModelLoader.java b/src/java/com/twitter/search/common/util/ml/prediction_engine/ModelLoader.java index 7809161b08..1f985522a5 100644 --- a/src/java/com/twitter/search/common/util/ml/prediction_engine/ModelLoader.java +++ b/src/java/com/twitter/search/common/util/ml/prediction_engine/ModelLoader.java @@ -60,7 +60,7 @@ public class ModelLoader implements Runnable { * ${counterPrefix}_num_models: * Number of models currently loaded. * ${counterPrefix}_num_loads: - * Number of succesful model loads. + * Number of successful model loads. * ${counterPrefix}_num_errors: * Number of errors occurred while loading the models. */ diff --git a/src/java/com/twitter/search/earlybird/partition/SimpleStreamIndexer.java b/src/java/com/twitter/search/earlybird/partition/SimpleStreamIndexer.java index 7b4e72281a..6f1d16bf7a 100644 --- a/src/java/com/twitter/search/earlybird/partition/SimpleStreamIndexer.java +++ b/src/java/com/twitter/search/earlybird/partition/SimpleStreamIndexer.java @@ -175,7 +175,7 @@ protected ConsumerRecords poll() { protected abstract void validateAndIndexRecord(ConsumerRecord record); - // Shutdown hook which can be called from a seperate thread. Calling consumer.wakeup() interrupts + // Shutdown hook which can be called from a separate thread. Calling consumer.wakeup() interrupts // the running indexer and causes it to first stop polling for new records before gracefully // closing the consumer. public void close() { diff --git a/src/java/com/twitter/search/earlybird/queryparser/HighFrequencyTermPairExtractor.java b/src/java/com/twitter/search/earlybird/queryparser/HighFrequencyTermPairExtractor.java index 83a9281852..e2df49b404 100644 --- a/src/java/com/twitter/search/earlybird/queryparser/HighFrequencyTermPairExtractor.java +++ b/src/java/com/twitter/search/earlybird/queryparser/HighFrequencyTermPairExtractor.java @@ -31,7 +31,7 @@ * opposite value of isPositive of the parent group. * * I'll try to break it down a bit further. Let's assume "a" and "b" are hf terms, and ' - * "[hf_term_pair a b]" represents querying their co-occurence. + * "[hf_term_pair a b]" represents querying their co-occurrence. * Query (* a b not_hf) can become (* [hf_term_pair a b] not_hf) * Query (+ -a -b -not_hf) can become (+ -[hf_term_pair a b] -not_hf) * These two rules represent the bulk of the rewrites that this class makes. diff --git a/tweetypie/common/src/scala/com/twitter/tweetypie/util/logging/AlertableExceptionLoggingFilter.scala b/tweetypie/common/src/scala/com/twitter/tweetypie/util/logging/AlertableExceptionLoggingFilter.scala index 0dae0bfdc5..7a850aaa13 100644 --- a/tweetypie/common/src/scala/com/twitter/tweetypie/util/logging/AlertableExceptionLoggingFilter.scala +++ b/tweetypie/common/src/scala/com/twitter/tweetypie/util/logging/AlertableExceptionLoggingFilter.scala @@ -7,7 +7,7 @@ import ch.qos.logback.core.spi.FilterReply import com.twitter.tweetypie.serverutil.ExceptionCounter.isAlertable /** - * This class is currently being used by logback to log alertable exceptions to a seperate file. + * This class is currently being used by logback to log alertable exceptions to a separate file. * * Filters do not change the log levels of individual loggers. Filters filter out specific messages * for specific appenders. This allows us to have a log file with lots of information you will diff --git a/tweetypie/common/src/thrift/com/twitter/tweetypie/tweet_service.thrift b/tweetypie/common/src/thrift/com/twitter/tweetypie/tweet_service.thrift index 3be5f3b12d..a8335cc4a6 100644 --- a/tweetypie/common/src/thrift/com/twitter/tweetypie/tweet_service.thrift +++ b/tweetypie/common/src/thrift/com/twitter/tweetypie/tweet_service.thrift @@ -1804,7 +1804,7 @@ struct PostTweetRequest { * time, tweetypie would delegate to creative container service. * * go/creatives-containers-tdd - * Please note that this id is never publically shared with clients, its only used for + * Please note that this id is never publicly shared with clients, its only used for * internal purposes. */ 35: optional i64 underlying_creatives_container_id (personalDataType = 'TweetId') diff --git a/tweetypie/server/src/main/scala/com/twitter/tweetypie/serverutil/logcachewrites/TweetCacheWrite.scala b/tweetypie/server/src/main/scala/com/twitter/tweetypie/serverutil/logcachewrites/TweetCacheWrite.scala index 6f1f49cd0c..61fe329f55 100644 --- a/tweetypie/server/src/main/scala/com/twitter/tweetypie/serverutil/logcachewrites/TweetCacheWrite.scala +++ b/tweetypie/server/src/main/scala/com/twitter/tweetypie/serverutil/logcachewrites/TweetCacheWrite.scala @@ -27,7 +27,7 @@ case class TweetCacheWrite( * If the tweet id is a snowflake id, this is an offset since tweet creation. * If it is not a snowflake id, then this is a Unix epoch time in * milliseconds. (The idea is that for most tweets, this encoding will make - * it easier to see the interval between events and whether it occured soon + * it easier to see the interval between events and whether it occurred soon * after tweet creation.) * - Cache action ("set", "add", "replace", "cas", "delete") * - Base64-encoded Cached[CachedTweet] struct diff --git a/twml/twml/argument_parser.py b/twml/twml/argument_parser.py index c771eebdf8..4db1fe89a2 100644 --- a/twml/twml/argument_parser.py +++ b/twml/twml/argument_parser.py @@ -411,7 +411,7 @@ def get_trainer_parser(): action=parse_comma_separated_list(element_type=float), default=None, help="Required for 'piecewise_constant_values' learning_rate_decay. " - "A list of comma seperated floats or ints that specifies the values " + "A list of comma separated floats or ints that specifies the values " "for the intervals defined by boundaries. It should have one more " "element than boundaries.") parser_piecewise_constant.add_argument( @@ -419,7 +419,7 @@ def get_trainer_parser(): action=parse_comma_separated_list(element_type=int), default=None, help="Required for 'piecewise_constant_values' learning_rate_decay. " - "A list of comma seperated integers, with strictly increasing entries.") + "A list of comma separated integers, with strictly increasing entries.") # Create the parser for the "inverse_learning_rate_decay_fn" parser_inverse = subparsers.add_parser('inverse_learning_rate_decay',